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

Harald van Dijk <harald at gigawatt dot nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |harald at gigawatt dot nl

--- Comment #3 from Harald van Dijk <harald at gigawatt dot nl> ---
Strictly speaking, this affects conformance because it causes GCC to wrongly
accept code without any diagnostic, in conforming modes (e.g. -std=c++14
-pedantic), where the standard requires a diagnostic for the syntax error:

  struct S { constexpr int operator=(int) { return 1; } };
  int main() { int a[S() = 1]; }

Sun C++ and Intel also accept it without any diagnostic. clang rejects it as a
syntax error.

Rejecting it as a syntax error when it was previously accepted seems like a bad
idea, though. Perhaps an extra warning if -pedantic is used would be
appropriate?

Reply via email to