From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7716 invoked by alias); 17 May 2002 04:36:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7700 invoked by uid 71); 17 May 2002 04:36:01 -0000 Date: Thu, 16 May 2002 21:36:00 -0000 Message-ID: <20020517043601.7699.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "M. P. Halpin" Subject: Re: c/6559: "-std=c99 -pedantic" displays c89 warning Reply-To: "M. P. Halpin" X-SW-Source: 2002-05/txt/msg00476.txt.bz2 List-Id: The following reply was made to PR c/6559; it has been noted by GNATS. From: "M. P. Halpin" To: schnetter@uni-tuebingen.de, pinskia@physics.uc.edu Cc: gcc-gnats@gcc.gnu.org Subject: Re: c/6559: "-std=c99 -pedantic" displays c89 warning Date: Fri, 17 May 2002 00:32:53 -0400 (EDT) Howdy. I hate to be a bother, but on gnatsweb it said this was fixed in gcc3.1. I just downloaded and installed the gcc3.1 release on my local workstation (FreeBSD 4.5), and it's still giving warnings when I compile (I was using "-std=c99 -pedantic -O3 -Wall"). So I grepped the source and found this in c-decl.c, starting on line 4620: if (pedantic) { if (TREE_CONSTANT (size)) pedwarn ("ISO C89 forbids array `%s' whose size can't be evaluated", name); else pedwarn ("ISO C89 forbids variable-size array `%s'", name); } Changing "if (pedantic)" to "if (pedantic && !flag_isoc99)" seemed to fix the problem.