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 mean to use ‘->’?
i = p->val;
^~
->
which seems a buggy error message to me: I wrote "p", not "*p"; also the
compiler suggests replacing "->" with itself.
Andrea Monaco
