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

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Fri Dec 10 21:53:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list