[Bug c++/13005] [3.3/3.4 Regresssion] [aliasing] Pointer wrongly adjusted for derived class containing virtual function
stephenma at telus dot net
gcc-bugzilla@gcc.gnu.org
Thu Jan 8 02:02:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list