www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22682] New: `pragma(mangle)` does not work at local scope

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

          Issue ID: 22682
           Summary: `pragma(mangle)` does not work at local scope
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: b2.temp gmx.com



```
void main() {
    pragma(mangle, "puts")
    extern(C) static int puts(const char*);
    puts("test");
}                   
```



/tmp/temp_7FF8B2F14490.d:2:5: Error: unrecognized `pragma(mangle)`
/tmp/temp_7FF8B2F14490.d:4:5: Error: undefined identifier `puts`

--
Jan 16 2022