view gcc/testsuite/gcc.dg/pr79983.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR c/79983 */
/* { dg-do compile } */
/* { dg-options "" } */

struct S;
struct S { int i; }; /* { dg-message "originally defined here" } */
struct S { int i, j; }; /* { dg-error "redefinition of 'struct S'" } */

enum E;
enum E { A, B, C }; /* { dg-message "originally defined here" } */
enum E { D, F }; /* { dg-error "redeclaration of 'enum E'" } */

union U;
union U { int i; }; /* { dg-message "originally defined here" } */
union U { int i; double d; }; /* { dg-error "redefinition of 'union U'" } */