Fix for c9[09]-impl-decl-1.c tests
Joseph S. Myers
jsm28@cam.ac.uk
Tue Jul 18 01:10:00 GMT 2000
On Mon, 17 Jul 2000, Zack Weinberg wrote:
> --- testsuite/gcc.dg/c99-impl-decl-1.c 2000/07/17 08:25:51 1.1
> +++ testsuite/gcc.dg/c99-impl-decl-1.c 2000/07/18 02:05:27
> @@ -6,8 +6,8 @@
> void
> foo (void)
> {
> - bar (); /* { dg-bogus "warning" "warning in place of error" } */
> - /* { dg-error "implicit" "C99 implicit declaration error" { xfail *-*-* } 9 } */
> + bar (); /* { dg-error "implicit" "C99 implicit declaration error" } */
> + /* { dg-bogus "warning" "warning in place of error" { target *-*-* } 9 } */
When writing the tests I'd observed that testing that -pedantic-errors was
doing its job required the test for a warning to come first, then the test
for the correct error to come afterwards with the line number, since
otherwise dg-error seemed to swallow the warning message, whether or not a
hard error, and dg-bogus could no longer match against it. Yes, a better
way of asserting that a message is an error rather than a warning would be
nice, but I couldn't see one.
--
Joseph S. Myers
jsm28@cam.ac.uk
More information about the Gcc-patches
mailing list