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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [c1x-anon-struct-3.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Test for anonymous structures and unions in C1X.  Test for invalid
2
   cases: typedefs disallowed by N1549.  */
3
/* { dg-do compile } */
4
/* { dg-options "-std=c1x -pedantic-errors" } */
5
 
6
typedef struct
7
{
8
  int i;
9
} s0;
10
 
11
typedef union
12
{
13
  int i;
14
} u0;
15
 
16
struct s1
17
{
18
  int a;
19
  u0; /* { dg-error "declaration does not declare anything" } */
20
  struct
21
  {
22
    int b;
23
  };
24
};
25
 
26
union u1
27
{
28
  int b;
29
  s0; /* { dg-error "declaration does not declare anything" } */
30
  union
31
  {
32
    int c;
33
  };
34
};

powered by: WebSVN 2.1.0

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