[Issue 23699] New: compilable/test22807.c:10:10: error: unknown type name ‘OldFashionedHeader’
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 12 15:28:06 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23699
Issue ID: 23699
Summary: compilable/test22807.c:10:10: error: unknown type name
‘OldFashionedHeader’
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/test22807.c:10:10: error: unknown type name ‘OldFashionedHeader’
10 | int peek(OldFashionedHeader *head){
| ^~~~~~~~~~~~~~~~~~
Test content:
```
struct OldFashionedHeader {
int n; // number of entries in buff
char buff[1];
};
int peek(OldFashionedHeader *head){
if(head->n < 2)
return 0;
return head->buff[1]; // do not give array bounds error
}
```
--
More information about the Digitalmars-d-bugs
mailing list