https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79657
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
$ clang++ -c u.cc
u.cc:1:15: error: cannot determine underlying type of incomplete enumeration
type 'E'
enum E { a = (__underlying_type (E)) {} };
^
u.cc:1:6: note: forward declaration of 'E'
enum E { a = (__underlying_type (E)) {} };
^
u.cc:1:38: error: expression is not an integral constant expression
enum E { a = (__underlying_type (E)) {} };
^~
2 errors generated.
but we just segv:
$ ./cc1plus -quiet u.cc -Wall -Wpedantic
u.cc:1:35: internal compiler error: Segmentation fault
enum E { a = (__underlying_type (E)) {} };
^