[Issue 23716] New: compilable/testcstuff2.c:18:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘asm’
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Feb 15 17:08:35 UTC 2023
    
    
  
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 at puremagic.com
          Reporter: ibuclaw at 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");
```
--
    
    
More information about the Digitalmars-d-bugs
mailing list