[Issue 15712] nested functions in unittests extern(C) not applied

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 3 12:23:14 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=15712

John Colvin <john.loughran.colvin at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |---

--- Comment #2 from John Colvin <john.loughran.colvin at gmail.com> ---
I don't think it's fixed, see output below:

$ dmd --version
DMD64 D Compiler v2.100.2
Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved
written by Walter Bright

$ cat test.d 
unittest
{
        extern(C) static void foo(){}
        pragma(msg, typeof(foo));
        pragma(msg, typeof(&foo));
}

extern(C):

unittest
{
        static void bar(){}
        pragma(msg, typeof(bar));
        pragma(msg, typeof(&bar));
}

unittest
{
        extern(C) static void baz(){}
        pragma(msg, typeof(baz));
        pragma(msg, typeof(&baz));
}

$ dmd -unittest -o- test.d
pure nothrow @nogc @safe extern (C) void()
extern (C) void function() pure nothrow @nogc @safe
pure nothrow @nogc @safe void()
void function() pure nothrow @nogc @safe
pure nothrow @nogc @safe void()
void function() pure nothrow @nogc @safe

--


More information about the Digitalmars-d-bugs mailing list