https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72708

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This code is accepted:
namespace {
  static union { int x; };
}

-----------------------------------
For the original testcase, only clang accepts the code; ICC, GCC and MSVC all
reject the code with the similar error message saying:
GCC:
<source>:3:18: error: namespace-scope anonymous aggregates must be static

ICC:
<source>(3): error: anonymous union at global or namespace scope must be
declared static

MSVC:
<source>(3): error C2646: an anonymous union at global or namespace scope must
be declared static

------- CUT -----

Reply via email to