mips.h (ISA_HAS_DSP, [...]): New macros.
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-30.c
blobf4e9859f98b48f3d9725f49bf920697781cc871f
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 "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 "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 "number of arguments doesn't match built-in prototype" } */
27 /* { dg-warning "argument 'foo' doesn't match built-in prototype" "foo" { target *-*-* } 26 } */
28 return strtod ("nan", 0);