missing diagnostic for member access on null pointer in C++11 constant expression evaluation #37549
Labels
accepts-invalid
bugzilla
Issues migrated from bugzilla
c++
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
confirmed
Verified by a second party
undefined behaviour
Extended Description
The code is as follow:
The code is invalid not because of a cast (there is none) but because it attempts to use a null pointer to form the address of a member of an object. clang++ accepts it. I checked g++. It rejects the code:
The text was updated successfully, but these errors were encountered: