This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20269] Optimizer problem with aliasing floating point variable
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2005 19:25:00 -0000
- Subject: [Bug c++/20269] Optimizer problem with aliasing floating point variable
- References: <20050301235056.20269.bobm75@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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