Re: Buggy error message when dereferencing once a double pointer to struct

2022-05-23 Thread Marek Polacek via Gcc
On Mon, May 23, 2022 at 06:43:55PM +0200, Andrea Monaco via Gcc wrote: > > This snippet that I wrote > > > struct > str > { > int val; > }; > > > void > main (int argc, char **argv) > { > struct str **p; > int i; > > i = p->val; > } > > > is obviously inc

Buggy error message when dereferencing once a double pointer to struct

2022-05-23 Thread Andrea Monaco via Gcc
This snippet that I wrote struct str { int val; }; void main (int argc, char **argv) { struct str **p; int i; i = p->val; } is obviously incorrect. But gcc 8.3.0 says pointer.c: In function ‘main’: pointer.c:14:8: error: ‘*p’ is a pointer; did you