First version committed to git
[zpugcc/jano.git] / toolchain / gcc / gcc / testsuite / gcc.dg / builtins-30.c
blob9ed0be53c40190e5259b531393a1248f43f627d5
1 /* { dg-do compile } */
2 /* { dg-options "-Wall -Wshadow" } */
4 extern double strtod (const char *, char **);
5 #define UNUSED __attribute__ ((unused))
7 /* A built-in function may be overridden by an old-style definition
8 specifying too few arguments... */
9 double cos ()
10 { /* { dg-warning "shadowing built-in" } */
11 return strtod ("nan", 0);
14 /* the right number, but the wrong type, arguments... */
15 double sin (foo)
16 int foo UNUSED; /* { dg-warning "shadowing built-in" } */
18 return strtod ("nan", 0);
21 /* or too many arguments. */
22 long double cosl (foo, bar)
23 long double foo UNUSED; /* { dg-warning "shadowing built-in" } */
24 int bar UNUSED;
26 return strtod ("nan", 0);