[MAJOR BUG] g++ 2.95.x generates invalid code for KDE 3.3.0

Thiago Macieira thiago.macieira at kdemail.net
Sun Sep 19 17:55:26 BST 2004


Leo Savernik wrote:
>> Exactly. So there's a major bug. Therefore, it's people using it that
>> should properly fix their compilers, not us working around the bugs.
>
>This is certainly not a major bug. It has existed for at least six years
> and nobody has noticed until now.

I somehow doubt that we were the first to find it.

I've been reading a lot about C++ ABI in the past few days. There's even 
some Compaq code to test virtual construction tables, at the top of which 
is written "this is known to fail in many compilers".

>Also note that "fixing the compiler" is a far more unrealistic expectation
>than "fixing the code" (think esp. proprietary compiler vendors).

Well, a few weeks ago, we told Jarosław Staniek that we would not support a 
broken version of MSVC++ and that he should upgrade his compiler to one 
with less known bugs.

>> g++ 2.95.4 on Linux is known now to produce invalid code.
>
>2.95 was known to procude other invalid code earlier, as were 3.0, 3.1,
> 3.2, 3.3, 3.4 etc.

Indeed. But g++ 2.95.x is no longer being developed nor, apparently, being 
fixed, whereas the 3.4.x version is.

>> It should no
>> longer be used.
>
>Well, if gcc 3.4 were discovered to generate invalid code tomorrow, nobody
>would demand its demise, but silently work around it.

No, we would. We would tell people to stop using gcc 3.4.2 because it 
produces invalid code and instead upgrade to 3.4.3.

Hence my recommendation: upgrade to gcc 2.95.5 assuming such a version comes 
about. If not, deliberately using a compiler that produces invalid code is 
not the programmer's responsibility.

Therefore, even with the fix going in now, I *DO NOT* vouch for my code (or 
any other code, for that matter) working on g++ 2.95.x anymore.

>Given that you have already determined a workaround, and the emerge of
> this kind of bug is now known, nothing keeps up from ongoing support of
> gcc-2.95.

Please read the commit message: "this introduces a behaviour change and a 
bug where previously there were none". I hardly think that's the ideal fix.

gcc 2.95 is almost five years old. Support for it has to be dropped 
somewhere along the line. I am proposing that it happens on KDE 4, so 
people will still have yet another year to upgrade. (KDE 3.4 should still 
compile on it)

Or do we still support gcc 2.7.x and 2.8.x as well?
-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiago (AT) macieira (DOT) info
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040919/89f442ba/attachment.sig>


More information about the kde-core-devel mailing list