You are not logged in.

#1 2005-10-03 18:27:59

elahav
Member
From: Ottawa, ON
Registered: 2005-04-18
Posts: 90

Getting warnings with new GCC

The new GCC complains about classes with virtual functions but without virtual destructors. This results in an abundance of warnings when compiling Qt and KDE software, to the point that it completely clutteres the compiler's output.
Is this a known issue?

Elad

Offline

#2 2005-10-03 19:15:11

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Getting warnings with new GCC

elahav wrote:

The new GCC complains about classes with virtual functions but without virtual destructors. This results in an abundance of warnings when compiling Qt and KDE software, to the point that it completely clutteres the compiler's output.
Is this a known issue?

Elad

warnings are not "issues" - warnings are good

virtual classes without virtual destructors are evil and should be fixed.

if anything is a "known issue" it's that Qt/KDE virtual classes are unsafe, as they do not include virtual destructors (even empty ones)

Offline

#3 2005-10-03 19:26:33

elahav
Member
From: Ottawa, ON
Registered: 2005-04-18
Posts: 90

Re: Getting warnings with new GCC

Warnings are good from a developer's point of view. A code that produces warnings should be fixed and not ignored.
However, I am not in charge of developing Qt or KDE. I am the USER. As such, I have encountered what, from my point of view, is a regression in Archlinux. KDE programmes, which used to compile without warnings, are now full of them, to the point where it becomes difficult to spot errors and warnings in my own software.

Offline

#4 2005-10-03 19:36:00

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Getting warnings with new GCC

elahav wrote:

I am the USER.
...it becomes difficult to spot errors and warnings in my own software.

Ummm those statements seem conflicting.

Anyway, let me explain this: gcc4 is not a slightly better version of gcc3 - it has large chunks redone and rewritten.  These warnings are a good thing - if you are seeing them, contact the Qt/KDE people and have *them* fix it (this is refered to as an "upstream error").
No matter what you think, this "issue" has nothing to do with archlinux - it has to do with Qt/KDE code being poorly formed *according to gcc4*

If you want this "fixed", downgrade gcc4 - otherwise you have to wait until they fix their code.

Offline

#5 2005-10-03 19:55:04

elahav
Member
From: Ottawa, ON
Registered: 2005-04-18
Posts: 90

Re: Getting warnings with new GCC

phrakture wrote:
elahav wrote:

I am the USER.
...it becomes difficult to spot errors and warnings in my own software.

Ummm those statements seem conflicting.

No contradiction. I am a software developer, and I use the Qt and KDE libraries. A development library is a product just like a web browser or a media player.

I fully understand that it is not Arch's fault that these warnings appear. I only posted this problem here because I wanted to now if it was encountered by other people and if there was, perhaps, a patch that can be used when building the Qt package. I assume this issue has been encountered in other distros that have previously moved to GCC 4, so a solution may exist somewhere.
While the responsibility for such issues lies with the Qt and KDE developers, getting a new maintenance release to solve this issue usually takes a long time.

Offline

#6 2005-10-03 19:59:07

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Getting warnings with new GCC

elahav wrote:

I have encountered what, from my point of view, is a regression in Archlinux.
...
I fully understand that it is not Arch's fault that these warnings appear.

I'd quit while you are behind, mate.

Offline

#7 2005-10-03 20:28:20

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Getting warnings with new GCC

Have you tried with kde 3.5? Tpowa has made a repo (search in Desktop forum). If kde 3.5 still produce these warnings, post a bug report on the *KDE/QT* bug tracker, maybe they'll be able to fix it for the final 3.5 release.

Offline

#8 2005-10-03 20:56:37

elahav
Member
From: Ottawa, ON
Registered: 2005-04-18
Posts: 90

Re: Getting warnings with new GCC

dibblethewrecker wrote:
elahav wrote:

I have encountered what, from my point of view, is a regression in Archlinux.
...
I fully understand that it is not Arch's fault that these warnings appear.

I'd quit while you are behind, mate.

It's getting a bit tiresome to explain myself, so I'll try to do it once and get it over with. Anyone still thinking I am behind, contradicting myself, or simply a complete moron, is entitled to do so.

I am a software developer, running Archlinux on my computers. Today I have upgraded my work machine, using pacman, following the move to GCC 4. As a result of this upgrade, I get an abundance of warnings every time I try to compile any piece of code using the Qt and KDE libraries.
The warnings are a result of bugs made by Qt and KDE developers. Not having a virtual destructor for a class containing virtual methods is bad C++ programming. Arch developers are in no way to be blamed for this.
However, as an Archlinux user I have experienced a regression. A regression is a change for the worse in the behaviour of a product. This change was not the result of a modification in the Qt/KDE code, but rather in Archlinux (the move to GCC 4).
If you take a look at some packages, you will often find that the Archlinux developers have included fixes to bugs in the package's own code. This does not mean that the Arch developers are responsible for the bug, but they do take on the responsibility of fixing it in order to make a better final product (the Archlinux distro as a whole).
Since many other distros have made the move to GCC 4, and since software using the Qt and KDE libraries is quite common (to say the least), I was simply wondering if this is a known problem that has perhaps been fixed elsewhere. It would be strange if no one else has noticed it.

Offline

#9 2005-10-03 21:18:24

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Getting warnings with new GCC

But its not broke. Why would package developers from other distros "fix it if it ain't broke?"

Offline

#10 2005-10-03 22:03:58

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Getting warnings with new GCC

I think most people notice it, but chose to ignore it - hell tomboy spits off a few hundred warnings about deprecated system calls and unused local parameters... but assuming it complies fine, that's all I care about.

If warnings are getting in the way of your error output, you can always shut off warnings via gcc/g++

Offline

#11 2005-10-03 22:08:46

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Getting warnings with new GCC

elahav, I haven't run across any recent patches in the current arch version of the libraries, as backports or fixes from the current head versions or from other distros, but I will keep my eyes open a bit.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

Board footer

Powered by FluxBB