From: Richard Henderson Date: Fri, 17 May 2002 06:06:46 +0000 (-0700) Subject: c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays for c99. X-Git-Tag: releases/gcc-3.1.1~346 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17c3278d662d66b174b7317e16923fcf35bebd72;p=thirdparty%2Fgcc.git c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays for c99. * c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays for c99. From-SVN: r53542 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 266de27de673..4558ab9205ea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-05-16 Richard Henderson + + PR c/3467 + * c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays + for c99. + 2002-05-16 Mark Mitchell * cfgrtl.c (purge_dead_edges): Correct handling of EDGE_EH. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 262825720c4c..a1e5870727e9 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4617,7 +4617,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) even if it is (eg) a const variable with known value. */ size_varies = 1; - if (pedantic) + if (!flag_isoc99 && pedantic) { if (TREE_CONSTANT (size)) pedwarn ("ISO C89 forbids array `%s' whose size can't be evaluated",