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] - Rev 750

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

/* Test for anonymous structures and unions in C1X.  Test for invalid
   cases: typedefs disallowed by N1549.  */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
 
typedef struct
{
  int i;
} s0;
 
typedef union
{
  int i;
} u0;
 
struct s1
{
  int a;
  u0; /* { dg-error "declaration does not declare anything" } */
  struct
  {
    int b;
  };
};
 
union u1
{
  int b;
  s0; /* { dg-error "declaration does not declare anything" } */
  union
  {
    int c;
  };
};
 

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

powered by: WebSVN 2.1.0

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