This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[testsuite] fix two test-framework tests
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Sep 2009 10:41:10 -0700
- Subject: [testsuite] fix two test-framework tests
- Reply-to: janis187 at us dot ibm dot com
The warning "return type defaults to 'int' moved a few months ago from
the opening brace in a function to the line with the function name.
This broke two tests for the test framework. This patch fixes those
tests of dg-bogus and dg-warning functionality by joining the two lines.
Checked in on trunk.
2009-09-29 Janis Johnson <janis187@us.ibm.com>
* gcc.test-framework/dg-bogus-exp-XF.c: Move dg-bogus directive.
* gcc.test-framework/dg-warning-exp-P.c: Move dg-warning directives.
Index: gcc/testsuite/gcc.test-framework/dg-bogus-exp-XF.c
===================================================================
--- gcc/testsuite/gcc.test-framework/dg-bogus-exp-XF.c (revision 152255)
+++ gcc/testsuite/gcc.test-framework/dg-bogus-exp-XF.c (working copy)
@@ -2,8 +2,7 @@
/* { dg-prms-id 42 } */
/* { dg-options "-Wall" } */
-main (int argc, char *argv[])
-{ /* { dg-bogus "return type" "bogus pass test" { xfail *-*-* } } */
+main (int argc, char *argv[]) { /* { dg-bogus "return type" "bogus pass test" { xfail *-*-* } } */
}
/* { dg-excess-errors "bogus pass test" { xfail *-*-* } } */
Index: gcc/testsuite/gcc.test-framework/dg-warning-exp-P.c
===================================================================
--- gcc/testsuite/gcc.test-framework/dg-warning-exp-P.c (revision 152255)
+++ gcc/testsuite/gcc.test-framework/dg-warning-exp-P.c (working copy)
@@ -2,10 +2,8 @@
/* { dg-prms-id 42 } */
/* { dg-options "-Wall" } */
-f ()
-{ /* { dg-warning "return type" "warning test" } */
+f () { /* { dg-warning "return type" "warning test" } */
} /* { dg-warning "control reaches end" "warning test" } */
-main (int argc, char *argv[])
-{ /* { dg-warning "return type" "warning test" } */
-} /* { dg-warning "control reaches end" "warning test" } */
+main (int argc, char *argv[]) { /* { dg-warning "return type" "warning test" } */
+} /* { dg-warning "control reaches end" "warning test" } */