This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug testsuite/25241] DejaGNU does not distinguish between errors and warnings
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Mar 2007 22:36:47 -0000
- Subject: [Bug testsuite/25241] DejaGNU does not distinguish between errors and warnings
- References: <bug-25241-1000@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #30 from manu at gcc dot gnu dot org 2007-03-22 22:36 -------
There is yet another strange behaviour of the current patch. For the testcase
in gcc.dg/array-2.c:
struct g g1 = { { 0, { } } };
struct g g2 = { { 0, { 1 } } }; /* { dg-error "(nested context)|(near
initialization)" "nested" } */
struct h { int x[0]; int y; };
struct h h1 = { { 0 }, 1 }; /* { dg-error "(excess elements)|(near
initialization)" "before end" } */
The output is:
gcc.dg/array-2.c:10: error: initialization of flexible array member in a nested
context
gcc.dg/array-2.c:10: error: (near initialization for 'g2.f.x')
gcc.dg/array-2.c:13: warning: excess elements in array initializer
gcc.dg/array-2.c:13: warning: (near initialization for 'h1.x')
And the test fails as follows:
PASS: gcc.dg/array-2.c nested (test for errors, line 10)
PASS: gcc.dg/array-2.c before end (test for errors, line 13)
FAIL: gcc.dg/array-2.c (test for excess errors)
Excess errors:
/home/manuel/src/trunk/gcc/testsuite/gcc.dg/array-2.c:13: warning: excess
elements in array initializer
It seems that the second dg-error matched the wrong line. Perhaps it is getting
confused by the alternatives. No idea.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25241