Bug 119209 - Qt headers throw dozens of compiler warnings
Summary: Qt headers throw dozens of compiler warnings
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: KDE (show other bugs)
Version: RC 4
Hardware: All Other
: P5 - None : Major
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-28 12:38 UTC by Stefan Hundhammer
Modified: 2005-10-05 12:39 UTC (History)
4 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Patch for affected Qt headers (1.08 KB, text/plain)
2005-09-29 15:59 UTC, Stefan Hundhammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Hundhammer 2005-09-28 12:38:08 UTC
For every C++ file that includes some Qt headers, I get dozens of compiler  
warnings:  
  
/usr/lib/qt3/include/qtooltip.h:86: warning: 'class QToolTip' has virtual  
functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:69: warning: 'struct QUBuffer' has virtual  
functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:77: warning: 'struct QUType' has virtual  
functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:104: warning: 'struct QUType_Null' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:287: warning: 'struct QUType_enum' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:307: warning: 'struct QUType_ptr' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:326: warning: 'struct QUType_iface' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:345: warning: 'struct QUType_idisp' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:364: warning: 'struct QUType_bool' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:383: warning: 'struct QUType_int' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:403: warning: 'struct QUType_double' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:423: warning: 'struct QUType_charstar' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:444: warning: 'struct QUType_QString' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucomextra_p.h:65: warning: 'struct QUType_QVariant'  
has virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucomextra_p.h:87: warning: 'struct QUType_varptr'  
has virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:69: warning: 'struct QUBuffer' has virtual  
functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:77: warning: 'struct QUType' has virtual  
functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:104: warning: 'struct QUType_Null' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:287: warning: 'struct QUType_enum' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:307: warning: 'struct QUType_ptr' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:326: warning: 'struct QUType_iface' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:345: warning: 'struct QUType_idisp' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:364: warning: 'struct QUType_bool' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:383: warning: 'struct QUType_int' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:403: warning: 'struct QUType_double' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:423: warning: 'struct QUType_charstar' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucom_p.h:444: warning: 'struct QUType_QString' has  
virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucomextra_p.h:65: warning: 'struct QUType_QVariant'  
has virtual functions but non-virtual destructor  
/usr/lib/qt3/include/private/qucomextra_p.h:87: warning: 'struct QUType_varptr'  
has virtual functions but non-virtual destructor  
 
 
Of course the compiler is perfectly right. But that doesn't help me very much: If 
there are any real compiler warnings about my own code, they get drowned out in 
that mass of unrelated warnings.
Comment 1 Dirk Mueller 2005-09-28 20:49:32 UTC
then disable that warning. See for example how KDE does it. 
(-Wno-non-virtual-dtor) 
 
fixing those warnings is binary incompatible.  
Comment 2 Stefan Hundhammer 2005-09-29 09:36:41 UTC
Are you kidding? Disabling warnings cannot be the way to go. And remember, this   
will not only suppress the warnings from those Qt headers, it will also suppress  
the same problem occurring in the applications. 
 
We have a zero warnings policy here. And we are really serious about that. 
Comment 3 Klaus Kämpf 2005-09-29 09:42:11 UTC
I fully agree with Stefan here (and went through this for all my packages :-() 
but "fixing those warnings is binary incompatible" is indeed a problem. 
 
Aj, your call ... 
Comment 4 Stefan Hundhammer 2005-09-29 09:45:01 UTC
Maybe there is a way to tell gcc to disable this warning only for the affected 
headers - some "#pragma dontknowwhat". But disabling them general is really a 
bad approach IMHO. 
Comment 5 Andreas Jaeger 2005-09-29 11:24:27 UTC
Compiler team, please provide some input here.
Comment 6 Richard Biener 2005-09-29 14:58:33 UTC
To hack around this problem place

#pragma GCC system_header

at the top of the Qt include files triggering this warning.

***HACK ALERT!!!***
Comment 7 Stefan Hundhammer 2005-09-29 15:56:10 UTC
Thanks for that hint! 
 
Will attach patch that suppresses those warnings for the affected include files. 
Comment 8 Stefan Hundhammer 2005-09-29 15:59:00 UTC
Created attachment 51159 [details]
Patch for affected Qt headers
Comment 9 Dirk Mueller 2005-10-05 12:39:11 UTC
that patch doesn't solve the issue. anyway, closing.