www.digitalmars.com         C & C++   DMDScript  

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

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

          Issue ID: 23720
           Summary: runnable/test22513.c:16:12: error: invalid use of
                    undefined type ‘struct S’
           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`


runnable/test22513.c:16:12: error: invalid use of undefined type ‘struct S’
   16 | int* p = &s.t.x;
      |            ^


Original test:
```
struct S s;
int* p = &s.t.x;

struct S { int a; struct T t; };

```

--
Feb 15 2023