From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16576 invoked by alias); 16 Aug 2003 08:25:23 -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 16546 invoked by uid 48); 16 Aug 2003 08:25:18 -0000 Date: Sat, 16 Aug 2003 08:25:00 -0000 From: "falk at debian dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20030816082516.11943.falk@debian.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/11943] New: Accepts invalid declaration "int x[2, 3];" in C99 mode X-Bugzilla-Reason: CC X-SW-Source: 2003-08/txt/msg01777.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 Summary: Accepts invalid declaration "int x[2, 3];" in C99 mode Product: gcc Version: 3.3.1 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: falk at debian dot org CC: gcc-bugs at gcc dot gnu dot org In C99, the brackets must contain an assignment-expression, however, "2, 3" is not an assignment-expression. I don't have the C89 standard, but I guess it's similar. It would be nice to reject this code, because it's a totally useless language extension, and it might confuse newbies trying to declare two-dimensional arrays.