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

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
clang also rejects this:
<source>:3:34: error: 'A::(unnamed struct at <source>:3:34)' cannot be defined
in a type specifier
  template<int> void foo(int = ((struct { int i; }) {0}).i);
                                 ^
<source>:3:57: error: member reference base type 'void' is not a structure or
union
  template<int> void foo(int = ((struct { int i; }) {0}).i);
                               ~~~~~~~~~~~~~~~~~~~~~~~~~^~
2 errors generated.

Reply via email to