summaryrefslogtreecommitdiffstats
path: root/test/CXX/class/class.union/class.union.anon/p4.cpp
blob: a12ec38503fa80675d92c9d19a7f8d7ad9bf74c8 (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: %clang_cc1 -std=c++11 -verify %s

union U {
  int x = 0; // expected-note {{previous initialization is here}}
  union {}; // expected-warning {{does not declare anything}}
  union {
    int z;
    int y = 1; // expected-error {{initializing multiple members of union}}
  };
};