[Issue 23719] New: runnable/test22071.c:22:16: error: ‘abc’ is a pointer; did you mean to use ‘->’?
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 15 17:47:29 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23719
Issue ID: 23719
Summary: runnable/test22071.c:22:16: error: ‘abc’ is a pointer;
did you mean to use ‘->’?
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`
runnable/test22071.c: In function ‘main’:
runnable/test22071.c:22:16: error: ‘abc’ is a pointer; did you mean to use
‘->’?
22 | int j = abc.b;
| ^
| ->
Original test:
```
struct S { int a, b; };
struct S *abc = &(struct S){ 1, 2 };
int main()
{
int j = abc.b;
if (j != 2)
return 1;
return 0;
}
```
--
More information about the Digitalmars-d-bugs
mailing list