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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2025-12-18

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
EDG is a bit better:

"sa.cc", line 2: error: expected a ","
  static_assert( test() };
                        ^

"sa.cc", line 2: error: expected a string literal
  static_assert( test() };
                         ^

"sa.cc", line 2: error: expected a ")"
  static_assert( test() };
                         ^

3 errors detected in the compilation of "sa.cc".



At least it mentions the string literal, without which the comma wouldn't help.

But all three compilers seem to want the comma, which isn't necessary since
C++17. The minimal change to fix the code is to just change } to )

Reply via email to