annotate gcc/testsuite/gcc.dg/old-style-prom-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Test for prototype followed by old-style definition, as in
kono
parents:
diff changeset
2 dremf-type-compat-2.c but with a non-built-in function. */
kono
parents:
diff changeset
3 /* { dg-do compile } */
kono
parents:
diff changeset
4 /* { dg-options "-pedantic" } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 float f (float, float); /* { dg-warning "prototype declaration" } */
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 float
kono
parents:
diff changeset
9 f (x, y)
kono
parents:
diff changeset
10 float x; /* { dg-warning "promoted argument 'x' doesn't match prototype" } */
kono
parents:
diff changeset
11 float y; /* { dg-warning "promoted argument 'y' doesn't match prototype" } */
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 return x + y;
kono
parents:
diff changeset
14 }