www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - =?UTF-8?B?W0lzc3VlIDIzNzE2XSBOZXc6IGNvbXBpbGFibGUvdGVzdGNzdHVm?=

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

          Issue ID: 23716
           Summary: compilable/testcstuff2.c:18:20: error: expected ‘=’,
                    ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘asm’
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

When compiling the test with `gcc -std=c11 -fsyntax-only`

compilable/testcstuff2.c:18:20: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or
‘__attribute__’ before ‘asm’
   18 | typedef int T21934 asm("realtype");
      |                    ^~~
compilable/testcstuff2.c:19:15: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or
‘__attribute__’ before ‘asm’
   19 | int init21934 asm("realsym") = 1;
      |               ^~~
compilable/testcstuff2.c:20:14: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or
‘__attribute__’ before ‘asm’
   20 | int var21934 asm("realvsym");
      |              ^~~

Original test case:
```
typedef int T21934 asm("realtype");
int init21934 asm("realsym") = 1;
int var21934 asm("realvsym");
int fun21934() asm("realfun");

```

--
Feb 15 2023