[PATCH]: Fix regressions - update the tests to reflect the change in the error message.

Seongbae Park seongbae.park@gmail.com
Tue Mar 13 00:40:00 GMT 2007


My patch of -Wvla (svn r122851) caused extra regressions in C and C++
because the patch changed the existing error messages
(to use the same terminology used in the C standard),
but didn't update the tests for the error.

The attached patch is an update of the tests to reflect
the change in the error message.
This patch has been tested using RUNTESTFLAGS=...
with make chec-gcc and check-g++.
OK ?

2007-03-12  Seongbae Park <seongbae.park@gmail.com>

        * gcc.dg/c90-vla-1.c: Reflect the change of the error message.
        * gcc.dg/c99-vla-1.c: Likewise.
        * g++.dg/ext/vla1.C: Likewise

-- 
#pragma ident "Seongbae Park, compiler, http://seongbae.blogspot.com"
-------------- next part --------------
Index: gcc/testsuite/gcc.dg/c90-vla-1.c
===================================================================
--- gcc/testsuite/gcc.dg/c90-vla-1.c	(revision 122851)
+++ gcc/testsuite/gcc.dg/c90-vla-1.c	(working copy)
@@ -5,7 +5,7 @@
 void
 tdef (int n)
 {
-  typedef int A[n];	/* { dg-error "forbids variable-size array" } */
+  typedef int A[n];	/* { dg-error "forbids variable length array" } */
   A a;
   A *p;
   p = &a;
Index: gcc/testsuite/gcc.dg/c99-vla-1.c
===================================================================
--- gcc/testsuite/gcc.dg/c99-vla-1.c	(revision 122851)
+++ gcc/testsuite/gcc.dg/c99-vla-1.c	(working copy)
@@ -5,7 +5,7 @@
 void
 tdef (int n)
 {
-  typedef int A[n];	/* { dg-bogus "forbids variable-size array" } */
+  typedef int A[n];	/* { dg-bogus "forbids variable length array" } */
   A a;
   A *p;
   p = &a;
Index: gcc/testsuite/g++.dg/ext/vla1.C
===================================================================
--- gcc/testsuite/g++.dg/ext/vla1.C	(revision 122851)
+++ gcc/testsuite/g++.dg/ext/vla1.C	(working copy)
@@ -9,7 +9,7 @@ class A { A (int); };
 
 A::A (int i)
 {
-  int ar[1][i];    // { dg-error "variable-size array" }
+  int ar[1][i];    // { dg-error "variable length array" }
 
   ar[0][0] = 0;
 }


More information about the Gcc-patches mailing list