From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13821 invoked by alias); 16 Aug 2003 13:19:32 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 13812 invoked by uid 48); 16 Aug 2003 13:19:32 -0000 Date: Sat, 16 Aug 2003 13:19:00 -0000 Message-ID: <20030816131932.13811.qmail@sources.redhat.com> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030816082516.11943.falk@debian.org> References: <20030816082516.11943.falk@debian.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/11943] Accepts invalid declaration "int x[2, 3];" in C99 mode X-Bugzilla-Reason: CC X-SW-Source: 2003-08/txt/msg01795.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11943 pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2003-08-16 13:19:31 date| | ------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-16 13:19 ------- I can confirm this on the mainline (20030815). The problem is that in the c-parse.y (really c-parse.in) The array_declarator is defined as follows: array_declarator: '[' maybe_type_quals_attrs expr ']' { $$ = build_array_declarator ($3, $2, 0, 0); } | '[' maybe_type_quals_attrs ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } | '[' maybe_type_quals_attrs '*' ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 1); } | '[' STATIC maybe_type_quals_attrs expr ']' { $$ = build_array_declarator ($4, $3, 1, 0); } /* declspecs_nosc_nots is a synonym for type_quals_attrs. */ | '[' declspecs_nosc_nots STATIC expr ']' { $$ = build_array_declarator ($4, $2, 1, 0); } ; which is different from what C99 says.