summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/semicolon4.C
blob: adba7a873c0a2de10f60c53171dff038a228fe64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// PR c++/46890
// { dg-do compile }

struct OK1
{
  int i;
} const *ok1_var;		// No complains

struct OK2;
extern OK2 ok2a_var;

struct OK2
{
  int i;
} const &ok2_var = ok2a_var;	// No complains

struct OK3
{
  int i;
} volatile (ok3_var);		// No complains

struct E1
{
  int i;
} const;			// { dg-error "qualifiers can only be specified for objects and functions" }

void foo (
struct E2
{				// { dg-error "types may not be defined in parameter types" }
  int i;
} volatile);

void bar (
struct E3
{				// { dg-error "types may not be defined in parameter types" }
  int i;
} const, int);