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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-09-15
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-invalid-code
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note GCC 11.4.0 didn't ICE but accepted the code. clang/MSVC/EDG all reject the
constexpr in a class with a virtual base class.

Without a template GCC does reject the constexpr constructor because it is a
class with a virtual base class BUT the error message is not exactly clear
there:
```
<source>: In constructor 'constexpr derived::derived(int)':
<source>:5:29: error: 'class derived' has virtual base classes
    5 |     constexpr derived(int) {}
      |                             ^
```
(but that is a different issue all together).

Reply via email to