The following code compiles fine with GCC:
constexpr struct {} s;
But Clang rejects it with the following error:
error: default initialization of an object of const type 'const struct (anonymous struct at …)' without a user-provided default constructor
I've tested all versions of GCC and Clang that I was able to find at https://gcc.godbolt.org/. Each version of GCC accepts the code and each version of Clang rejects it.
I wonder which compiler is correct in this case?
What does the standard say about this?