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++/20269] Optimizer problem with aliasing floating point variable


------- Additional Comments From bangerth at dealii dot org  2005-03-02 19:24 -------
The problem with the compiler not warning about these cases is that it is 
perfectly legal to cast a double* to an int* -- the problem is that it is 
not legal to access a double through an int*, but to flag this as a warning 
would mean that the compiler has to keep track of what each pointer points 
to, a task it cannot do in general. We just have to ask our users to write 
decent code... 
 
W. 

-- 


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


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