This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Fix ICE on invalid typeid argument (PR c++/36405)


Jason Merrill wrote:
Jakub Jelinek wrote:
The standard is weird, requiring error on
struct S;
const char *p = typeid (S).name ();
but not on
struct S;
const char *q = typeid (S [1]).name ();
is certainly inconsistent.

Actually, on further consideration this doesn't seem as nonsensical to me; it seems to be there to be consistent with the expression case, which really does only need to apply to expressions of class type.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]