comparison gcc/testsuite/gcc.dg/pr68533.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 /* PR c/68533 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
4
5 struct T { int t; };
6
7 void
8 f1 (
9 struct S * /* { dg-warning "declared inside parameter list will not be visible outside of this definition or declaration" } */
10 x,
11 struct T *
12 y
13 )
14 {
15 y->t = 4;
16 }
17
18 void
19 f2 (
20 struct {int s;} * /* { dg-warning "anonymous struct declared inside parameter list will not be visible outside of this definition or declaration" } */
21 x,
22 struct T *
23 y
24 )
25 {
26 y->t = 5;
27 }
28
29 void
30 f3 (
31 const void /* { dg-error "'void' as only parameter may not be qualified" } */
32 )
33 {
34 }
35
36 void
37 f4 (
38 void, /* { dg-error "'void' must be the only parameter" } */
39 ...
40 )
41 {
42 }
43
44 void
45 f5 (
46 int
47 x; /* { dg-error "parameter 'x' has just a forward declaration" } */
48 int y
49 )
50 {
51 }
52
53 void
54 f6 (
55 int
56 x,
57 void /* { dg-error "'void' must be the only parameter" } */
58 )
59 {
60 }
61
62 void
63 f7 (
64 void, /* { dg-error "'void' must be the only parameter" } */
65 int y
66 )
67 {
68 }