view gcc/testsuite/gcc.dg/anon-struct-15.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* Test diagnostics for duplicate field names involving anonymous
   struct or union as first field.  PR 46889.  */
/* { dg-do compile } */
/* { dg-options "" } */

struct foo {
  union {
    struct {
      unsigned long time_stamp;
    };
    struct {
      int *page;
    };
  };
  int *page; /* { dg-error "duplicate member" } */
};