This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13005] [3.3/3.4 Regresssion] [aliasing] Pointer wrongly adjusted for derived class containing virtual function
- From: "stephenma at telus dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jan 2004 02:02:05 -0000
- Subject: [Bug c++/13005] [3.3/3.4 Regresssion] [aliasing] Pointer wrongly adjusted for derived class containing virtual function
- References: <20031111075141.13005.stephenma@telus.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From stephenma at telus dot net 2004-01-08 02:01 -------
I will attach a patch against the mainline snapshot gcc-3.4-20031231. But
first, a bit of discussion.
Andrew Pinski wrote:
> A lot of ARM conferming code cannot be compiled with standard C++ compilers.
I am not suggesting that g++ needs to support the sort of gratuitous
incompatibilities that a certain company in Redmond likes to introduce. A
program that breaks the rules gets no sympathy from me.
However, there are billions of lines of *working* code that conform to the old
rules (the ARM). Perfectly compiling all of it may not be possible, but
fairness to these law-abiding programs should compel us to handle as many of
them as we can, or at least to have the compiler warn the programmer when
failure is probable. Retroactively breaking a working, standard-conforming
program would be unfair, especially if the breakage happens silently.
In my patch I have taken the "warning" approach. A longer-term solution may
also be possible, as I have hinted before, but the patch is adequate for now.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13005