druntime icon indicating copy to clipboard operation
druntime copied to clipboard

core.sys.posix.signal: add @system

Open WalterBright opened this issue 4 years ago • 6 comments

WalterBright avatar Mar 26 '20 17:03 WalterBright

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + druntime#3009"

dlang-bot avatar Mar 26 '20 17:03 dlang-bot

@WalterBright : Looks like there is a difference in the output of stringof for Linux32. The test relies on stringof, so I don't think it's a good test (we explicitly advise against it), but regardless the difference should be investigated.

Geod24 avatar Mar 30 '20 00:03 Geod24

I did some digging on the failing .stringof test for #3117 , and I think it's issue 3796. Here's a reduced test case:

module testInference;

import core.demangle: demangle;

void foo8504()() {}

auto toDelegate8504a(F)(auto ref F fp) { return fp; }

extern(C) void testC8504() {}

void test8504()
{
    // commenting out the following line makes the test pass on 32-bit linux
    static assert(demangle(foo8504!().mangleof) == "pure nothrow @nogc @safe void testInference.foo8504!().foo8504()");

    auto fp1 = toDelegate8504a(&testC8504);
    static assert(typeof(fp1).stringof == "extern (C) void function()");
}

pbackus avatar May 28 '20 21:05 pbackus

There doesn't seem to be any failures any more (for the tests that completed up until now). Is there anything blocking this PR?

RazvanN7 avatar Aug 31 '21 10:08 RazvanN7

This seems to break the dmd test suite:

compilable/testInference.d(287): Error: static assert:  `"extern (C) void function() @system" == "extern (C) void function()"` is false

RazvanN7 avatar Sep 28 '21 10:09 RazvanN7

Probably blocked by https://issues.dlang.org/show_bug.cgi?id=18269, where because of an import of this module, the first extern (C) void function() that dmd sees now has an explicit @system attribute.

dkorpel avatar Mar 01 '22 22:03 dkorpel