OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [Wcxx-compat-7.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Wc++-compat" } */
3
 
4
struct s1
5
{
6
  enum e1       /* { dg-message "note: enum type defined here" } */
7
  {
8
    A,          /* { dg-message "note: enum constant defined here" } */
9
    B
10
  } f1;
11
  struct s2     /* { dg-message "note: struct defined here" } */
12
  {
13
    struct s3   /* { dg-message "note: struct defined here" } */
14
    {
15
      enum e1 f3;
16
      struct s1 *p1;
17
      struct s2 *p2;
18
      struct s3 *p3;
19
    } f2;
20
    union u1    /* { dg-message "note: union defined here" } */
21
    {
22
      int f4;
23
    } f5;
24
    struct s3 f6;
25
  } f7;
26
  struct s2 f8;
27
  enum e1 f9;
28
};
29
 
30
struct s1 v1;
31
enum e1 v2;     /* { dg-warning "not visible in C\[+\]\[+\]" } */
32
struct s2 v3;   /* { dg-warning "not visible in C\[+\]\[+\]" } */
33
struct s3 v4;   /* { dg-warning "not visible in C\[+\]\[+\]" } */
34
union u1 v5;    /* { dg-warning "not visible in C\[+\]\[+\]" } */
35
int i = A;      /* { dg-warning "not visible in C\[+\]\[+\]" } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.