This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/70756] New: Wrong column number shown for "error: invalid use of flexible array member"


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

            Bug ID: 70756
           Summary: Wrong column number shown for "error: invalid use of
                    flexible array member"
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ch3root at openwall dot com
  Target Milestone: ---

When compiling this program:

int main()
{
  struct {
    int x;
    int y[];
  } s;

  12345 && &s.y + 1;
}

I get the following error message:

$ gcc example.c 
example.c: In function âmainâ:
example.c:8:3: error: invalid use of flexible array member
   12345 && &s.y + 1;
   ^~~~~

The column number is wrong.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]