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;
}
```
Comment #1 by bugzilla — 2023-05-31T08:29:53Z
Looks like ImportC inherited D's ability to use . instead of ->. Nevertheless, it should be fixed.
Comment #2 by dlang-bot — 2023-06-01T02:27:30Z
@WalterBright created dlang/dmd pull request #15287 "fix Issue 23719 - runnable/test22071.c:22:16: error: .abc. is a point…" fixing this issue:
- fix Issue 23719 - runnable/test22071.c:22:16: error: .abc. is a pointer; did you mean to use .->.?
https://github.com/dlang/dmd/pull/15287
Comment #3 by dlang-bot — 2023-06-01T11:06:49Z
dlang/dmd pull request #15287 "fix Issue 23719 - runnable/test22071.c:22:16: error: .abc. is a point…" was merged into master:
- f8dd137b80c1fe9edd7551d70d083838cb930e34 by Walter Bright:
fix Issue 23719 - runnable/test22071.c:22:16: error: .abc. is a pointer; did you mean to use .->.?
https://github.com/dlang/dmd/pull/15287