[Bug c/22192] Rejection of valid array declaration.
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-29 05:39 --- Fixed. -- What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED Target Milestone|--- |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22192
[Bug c/22192] Rejection of valid array declaration.
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-07-29 02:42 --- Subject: Bug 22192 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2005-07-29 02:42:20 Modified files: gcc: ChangeLog c-typeck.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg: c99-vla-2.c Log message: PR c/22192 * c-typeck.c (composite_type): Prefer constant size arrays to VLAs. testsuite: * gcc.dg/c99-vla-2.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9594&r2=2.9595 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.470&r2=1.471 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5848&r2=1.5849 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/c99-vla-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22192
[Bug c/22192] Rejection of valid array declaration.
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 13:49 --- Confirmed. -- What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed||1 Keywords||rejects-valid Last reconfirmed|-00-00 00:00:00 |2005-06-27 13:49:19 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22192
[Bug c/22192] Rejection of valid array declaration.
-- What|Removed |Added OtherBugsDependingO||16989 nThis|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22192
[Bug c/22192] Rejection of valid array declaration.
--- Additional Comments From neil at gcc dot gnu dot org 2005-06-26 15:11 --- (In reply to comment #0) > 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]; > } I should add that switching p and q causes GCC to accept it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22192