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

Jason Merrill jason@redhat.com
Thu Jun 12 14:29:00 GMT 2008


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



More information about the Gcc-patches mailing list