https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90680

            Bug ID: 90680
           Summary: Misleading fixit warning with pointers to pointers
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: blitzrakete at gmail dot com
  Target Milestone: ---

Consider:

int main(void) {
    struct { int a; } **p;
    p->a; // error
}

gcc gives me:

<source>: In function 'main':

<source>:3:6: error: '*p' is a pointer; did you mean to use '->'?

    3 |     p->a;

      |      ^~

      |      ->

I realize that the error is good enough, since it does say that *p is a pointer
type, which is correct. But it should not tell me to use ->.

Reply via email to