1 // RUN: %clang_cc1 %s -verify=c -fsyntax-only 2 // RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ 3 // RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility 4 // RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility -x c++ 5 6 // The test checks that an attempt to initialize union with flexible array 7 // member with an initializer list doesn't crash clang. 8 9 10 union { char x[]; } r = {0}; // c-error {{flexible array member 'x' in a union is not allowed}} 11 12 // expected-no-diagnostics 13 14