MMIX: Correct handling of C23 (...) functions, PR117618
[official-gcc.git] / gcc / testsuite / gcc.dg / dremf-type-compat-2.c
blobffb56a73b91c551b4eb0b35bac3c31cc9702c350
1 /* Test for bogus diagnostics for dremf definition. Although this
2 definition is formally incorrect in ISO C, a GNU extension permits
3 a prototype followed by unpromoted types in a function definition,
4 so it should be permitted when the function is built in. Bug
5 16666. Test with -pedantic, where the problem should still be
6 diagnosed. */
7 /* { dg-do compile } */
8 /* { dg-options "-std=gnu17 -pedantic" } */
10 float dremf (float, float); /* { dg-warning "prototype declaration" } */
12 float
13 dremf (x, y)
14 float x; /* { dg-warning "promoted argument 'x' doesn't match prototype" } */
15 float y; /* { dg-warning "promoted argument 'y' doesn't match prototype" } */
17 return x + y;