You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I guess since you discovered this, this means that something actually uses this and expects it to work? Or does it come from genuinely invalid code?
The crash actually occurs when implicitly converting the incomplete enum type back to int in the initialization. We check if this is an integral promotion, and for this we attempt to get the enum's promoted type. But that type hasn't been computed for the incomplete enum, so null is returned, which we eventually access.
There's something very fishy about that code, aside from crashing.
Anyway, the question is, what result do we want for this?
Extended Description
test.cpp:
enum E;
int a = (E)3;
clang -cc1 -fsyntax-only test.cpp
stack dump.
The text was updated successfully, but these errors were encountered: