[Bug c/103113] New: Bad error message with multiply indirect pointer to struct

elronnd at elronnd dot net gcc-bugzilla@gcc.gnu.org
Sun Nov 7 04:16:39 GMT 2021


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

            Bug ID: 103113
           Summary: Bad error message with multiply indirect pointer to
                    struct
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: elronnd at elronnd dot net
  Target Milestone: ---

$ cat q.c
int f() {
        struct { int m; } **x;
        return x->m;
}
$ gcc -c q.c
q.c: In function ‘f’:
q.c:3:17: error: ‘*x’ is a pointer; did you mean to use ‘->’?
    3 |         return x->m;
      |                 ^~
      |                 ->


More information about the Gcc-bugs mailing list