------- Comment #4 from reichelt at gcc dot gnu dot org 2009-03-03 23:02 ------- > Actually if you do inlining you end up with the cast happening to &node in > this > case. Your reduced testcase is undefined because nothing can change y.prev > between the constructor and the call to back so you end up with accessing a > Node_base via a Node and there is no such data there.
That's not true. xyz's body can change prev. In fact, if you define xyz() { prev=new Node, } the warning goes away. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39358