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/22192] New: Rejection of valid array declaration.


With -fsyntax-only GCC erroneously rejects the following array 'x' as having
non-constant size.  Its size should evaluate to 1.

int
bar (int v)
{
  int (*p)[v];
  int (*q)[2];

  static int x[sizeof(*(v ? p : q)) == 2 * sizeof (int)];

  return x[0];
}

-- 
           Summary: Rejection of valid array declaration.
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: neil at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22192


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