Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / builtins-30.c
blobd65b8948ee101061ba3179f7960ac2dbf29bc4c0
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 "shadows a built-in" } */
11 /* { dg-warning "warning: number of arguments doesn't match built-in prototype" "built-in" { target *-*-* } 10 } */
12 return strtod ("nan", 0);
15 /* the right number, but the wrong type, arguments... */
16 double sin (foo)
17 int foo UNUSED; /* { dg-warning "shadows a built-in" } */
18 { /* { dg-warning "warning: argument 'foo' doesn't match built-in prototype" } */
19 return strtod ("nan", 0);
22 /* or too many arguments. */
23 long double cosl (foo, bar)
24 const char *foo UNUSED; /* { dg-warning "shadows a built-in" } */
25 int bar UNUSED;
26 { /* { dg-warning "warning: number of arguments doesn't match built-in prototype" } */
27 /* { dg-warning "warning: argument 'foo' doesn't match built-in prototype" "foo" { target *-*-* } 26 } */
28 return strtod ("nan", 0);