Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/dremf-type-compat-3.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
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-errors, where the problem should still | |
6 be diagnosed. */ | |
7 /* { dg-do compile } */ | |
8 /* { dg-options "-pedantic-errors" } */ | |
9 | |
10 float dremf (float, float); /* { dg-error "prototype declaration" } */ | |
11 | |
12 float | |
13 dremf (x, y) | |
14 float x; /* { dg-error "promoted argument 'x' doesn't match prototype" } */ | |
15 float y; /* { dg-error "promoted argument 'y' doesn't match prototype" } */ | |
16 { | |
17 return x + y; | |
18 } |