Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gdc.dg / Wbuiltin_declaration_mismatch1.d
blob53406474a851cc54331b1134f9dec919b60d106f
1 // { dg-do compile }
2 // { dg-options "-Wbuiltin-declaration-mismatch" }
4 extern(C):
6 // Mismatched parameter lengths
7 double tan(); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" }
9 // Mismatched variadic arguments
10 int printf(const(char)*); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" }
12 // Mismatched return type
13 void puts(char*); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" }
15 // Mismatched return storage class
16 ref int isalnum(int); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" }
18 // Mismatched parameter type
19 double sin(long); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" }
21 // Mismatched parameter storage class
22 double frexp(double, lazy int*); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" }
23 double log(ref double); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" }
25 // Verify that storage classes don't affect covariance matching
26 @trusted nothrow @nogc pure double fabs(double);
28 // Verify inout is allowed instead of const
29 inout(char)* strstr(return scope inout(char)*, scope const char*) pure;
31 // Verify that FILE* is allowed as it is implicitly convertable to void*
32 struct _IO_FILE{}
33 alias FILE = shared(_IO_FILE);
34 int fprintf(FILE*, scope const char*, scope const ...);
36 // Verify integral types with same size are treated as if equivalent
37 int putchar(dchar);