This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix builtins-30.c
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 23 Jan 2004 21:27:00 -0800
- Subject: Fix builtins-30.c
Silly me, I put the dg-warnings on the wrong lines. And fixed them on
the 3.4 branch but not on the mainline.
zw
* gcc.dg/builtins-30.c: Move dg-warning marks to the proper lines.
===================================================================
Index: testsuite/gcc.dg/builtins-30.c
--- testsuite/gcc.dg/builtins-30.c 23 Jan 2004 18:13:55 -0000 1.1
+++ testsuite/gcc.dg/builtins-30.c 24 Jan 2004 05:20:39 -0000
@@ -7,21 +7,21 @@ extern double strtod (const char *, char
/* A built-in function may be overridden by an old-style definition
specifying too few arguments... */
double nan ()
-{
- return strtod ("nan", 0); /* { dg-warning "shadowing built-in" } */
+{ /* { dg-warning "shadowing built-in" } */
+ return strtod ("nan", 0);
}
/* the right number, but the wrong type, arguments... */
float nanf (foo)
- int foo UNUSED;
+ int foo UNUSED; /* { dg-warning "shadowing built-in" } */
{
- return strtod ("nan", 0); /* { dg-warning "shadowing built-in" } */
+ return strtod ("nan", 0);
}
/* or too many arguments. */
long double nanl (foo, bar)
- const char *foo UNUSED;
+ const char *foo UNUSED; /* { dg-warning "shadowing built-in" } */
int bar UNUSED;
{
- return strtod ("nan", 0); /* { dg-warning "shadowing built-in" } */
+ return strtod ("nan", 0);
}