summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wcxx-compat-15.c
blob: 82a76ec4d0f1088e6fbab78889a9ec0863aed9ed (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
/* { dg-do compile } */
/* { dg-options "-Wc++-compat" } */

typedef int myint1;
typedef int myint2;
typedef int myint3;
struct s1
{
  myint1 myint1;	/* { dg-warning "invalid in C\[+\]\[+\]" } */
  myint2 *myint2;	/* { dg-warning "invalid in C\[+\]\[+\]" } */
  int myint3;
  struct s2
  {
    myint3 f2;		/* { dg-warning "C\[+\]\[+\]" } */
  } f1;
};

struct s3
{
  int myint1;
  struct s4
  {
    int myint1;
  } f1;
  struct s5
  {
    int myint1;
    struct s6
    {
      myint1 f4;	/* { dg-warning "C\[+\]\[+\]" } */
    } f3;
  } f2;
};