1 // RUN: %clang_cc1 -verify %s -pedantic-errors -std=c++11 2 // RUN: %clang_cc1 -verify %s -pedantic-errors -std=c++14 3 // expected-no-diagnostics 4 5 struct foo_t { 6 union { 7 int i; 8 volatile int j; 9 } u; 10 }; 11 12 __attribute__((__require_constant_initialization__)) 13 static const foo_t x = {{0}}; 14 15 union foo_u { 16 int i; 17 volatile int j; 18 }; 19 20 __attribute__((__require_constant_initialization__)) 21 static const foo_u y = {0}; 22