Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / c2x-unproto-1.c
blobd21c6a712fb5c34a44e894e8c7a713555ec5f558
1 /* Test compatibility of prototyped function types with and without arguments
2 (C2x made the case of types affected by default argument promotions
3 compatible, before removing unprototyped functions completely). Test
4 affected usages are not accepted for C2x. */
5 /* { dg-do compile } */
6 /* { dg-options "-std=c2x -pedantic-errors" } */
8 void f1 (); /* { dg-message "previous declaration" } */
9 void f1 (float); /* { dg-error "conflicting types" } */
11 void f2 (float); /* { dg-message "previous declaration" } */
12 void f2 (); /* { dg-error "conflicting types" } */
14 void f3 (); /* { dg-message "previous declaration" } */
15 void f3 (char); /* { dg-error "conflicting types" } */
17 void f4 (char); /* { dg-message "previous declaration" } */
18 void f4 (); /* { dg-error "conflicting types" } */
20 /* Built-in function case. */
21 float sqrtf (); /* { dg-warning "conflicting types for built-in function" } */