]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays for c99.
authorRichard Henderson <rth@redhat.com>
Fri, 17 May 2002 06:06:46 +0000 (23:06 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 17 May 2002 06:06:46 +0000 (23:06 -0700)
        * c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays
        for c99.

From-SVN: r53542

gcc/ChangeLog
gcc/c-decl.c

index 266de27de673a572a6f308f68bc8df3308c2b222..4558ab9205ea5a0ecce5507fd52b3f085d2d129a 100644 (file)
@@ -1,3 +1,9 @@
+2002-05-16  Richard Henderson  <rth@redhat.com>
+
+       PR c/3467
+       * c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays
+       for c99.
+
 2002-05-16  Mark Mitchell  <mark@codesourcery.com>
 
        * cfgrtl.c (purge_dead_edges): Correct handling of EDGE_EH.
index 262825720c4cbe5280b5582b65452993ebb4c70e..a1e5870727e987b9abf2019ca4adcb631690d948 100644 (file)
@@ -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",