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

--- Comment #10 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-11-01 09:10:56 UTC ---
(In reply to comment #9)
I don't think that the standard says (or intends to say) that an implementation
has to defer all evaluations here. For example, assume you provide

polymorphic& operator+(polymorphic a, polymorphic b);

with some definition this is still UB when the expression

*(T*)0 + *(T*)0

occurs as operand of typeid (Note the arguments are by value). An
implementation is only required to detect whether an (immediate) runtime
glvalue of a polymorphic class as argument of typeid refers to an "empty
glvalue". Anything beyond that would fall under 

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#232

I think.

Reply via email to