[Bug c++/18933] pointer-to-member called on incomplete type generates bad code

2004-12-10 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-10 
21:09 ---
Yes this invalid code and here is the werid part we have a error_mark_node.
So this is a dup of bug 15684.

*** This bug has been marked as a duplicate of 15684 ***

-- 
   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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


[Bug c++/18933] pointer-to-member called on incomplete type generates bad code

2004-12-10 Thread bangerth at dealii dot org

--- Additional Comments From bangerth at dealii dot org  2004-12-10 21:53 
---
The fact that we don't issue any errors is a duplicate of PR 15684. However, 
the code is fundamentally broken in that you cast a pointer to B into a 
pointer to A and use it to do something with it. This violates aliasing 
constraints, and you shouldn't be surprised that your code does weird 
things. 
 
W. 

-- 


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