This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]