[Bug c++/25466] typeid expression fails to throw bad_typeid according to 5.2.8p2

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 3 17:21:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25466

--- Comment #13 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-03 17:21:52 UTC ---
I guess it depends on the meaning of "obtained".  If "obtained" refers to the
form of the expression, G++ is following the standard.  If it refers to the
place where the pointer was originally turned into a glvalue, then G++ is
wrong.

I think the best thing to do is to stop looking specifically at the form of the
expression and instead see if the address of the expression is null.



More information about the Gcc-bugs mailing list