* How to turn off a warning in a file
@ 2006-06-13 11:23 robbie.doggie
2006-06-13 11:33 ` Gabriel Dos Reis
2006-06-13 22:06 ` Christoph Bartoschek
0 siblings, 2 replies; 6+ messages in thread
From: robbie.doggie @ 2006-06-13 11:23 UTC (permalink / raw)
To: gcc-help
Hi,
I'm compiling with compiler option -Wall, which is fine for all my files. But I'm also including third party headers which return billions of " `class xy' has virtual functions but non-virtual destructor" warnings.
Is it possible to turn off this warning for these files?
Kind regards,
Hans-Heiri
--
"Feel free" â 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to turn off a warning in a file
2006-06-13 11:23 How to turn off a warning in a file robbie.doggie
@ 2006-06-13 11:33 ` Gabriel Dos Reis
2006-06-16 17:19 ` Paulo J. Matos
2006-06-13 22:06 ` Christoph Bartoschek
1 sibling, 1 reply; 6+ messages in thread
From: Gabriel Dos Reis @ 2006-06-13 11:33 UTC (permalink / raw)
To: robbie.doggie; +Cc: gcc-help
robbie.doggie@gmx.net writes:
| Hi,
|
| I'm compiling with compiler option -Wall, which is fine for all my
| files. But I'm also including third party headers which return
| billions of " `class xy' has virtual functions but non-virtual
| destructor" warnings.
very annoying warning, isn't it?
| Is it possible to turn off this warning for these files?
Append -Wno-virtual-dtor.
-- Gaby
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to turn off a warning in a file
2006-06-13 11:23 How to turn off a warning in a file robbie.doggie
2006-06-13 11:33 ` Gabriel Dos Reis
@ 2006-06-13 22:06 ` Christoph Bartoschek
1 sibling, 0 replies; 6+ messages in thread
From: Christoph Bartoschek @ 2006-06-13 22:06 UTC (permalink / raw)
To: gcc-help
Am Dienstag, 13. Juni 2006 13:23 schrieb robbie.doggie@gmx.net:
> Hi,
>
> I'm compiling with compiler option -Wall, which is fine for all my files.
> But I'm also including third party headers which return billions of "
> `class xy' has virtual functions but non-virtual destructor" warnings. Is
> it possible to turn off this warning for these files?
If your third party headers are in a separate directory you can use -isystem
<dir> instead of -I<dir>. This disables most of the warnings for headers
from <dir>.
Christoph
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to turn off a warning in a file
2006-06-13 11:33 ` Gabriel Dos Reis
@ 2006-06-16 17:19 ` Paulo J. Matos
2006-06-16 18:46 ` Gabriel Dos Reis
0 siblings, 1 reply; 6+ messages in thread
From: Paulo J. Matos @ 2006-06-16 17:19 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: robbie.doggie, gcc-help
On 13 Jun 2006 06:33:50 -0500, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
> robbie.doggie@gmx.net writes:
>
> | Hi,
> |
> | I'm compiling with compiler option -Wall, which is fine for all my
> | files. But I'm also including third party headers which return
> | billions of " `class xy' has virtual functions but non-virtual
> | destructor" warnings.
>
> very annoying warning, isn't it?
>
> | Is it possible to turn off this warning for these files?
>
> Append -Wno-virtual-dtor.
>
Not available in g++ 4.1.1:
cc1plus: error: unrecognized command line option "-Wno-virtual-dtor"
> -- Gaby
>
--
Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering
INESC-ID - SAT Group
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to turn off a warning in a file
2006-06-16 17:19 ` Paulo J. Matos
@ 2006-06-16 18:46 ` Gabriel Dos Reis
0 siblings, 0 replies; 6+ messages in thread
From: Gabriel Dos Reis @ 2006-06-16 18:46 UTC (permalink / raw)
To: pocm; +Cc: robbie.doggie, gcc-help
"Paulo J. Matos" <pocmatos@gmail.com> writes:
| On 13 Jun 2006 06:33:50 -0500, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
| > robbie.doggie@gmx.net writes:
| >
| > | Hi,
| > |
| > | I'm compiling with compiler option -Wall, which is fine for all my
| > | files. But I'm also including third party headers which return
| > | billions of " `class xy' has virtual functions but non-virtual
| > | destructor" warnings.
| >
| > very annoying warning, isn't it?
| >
| > | Is it possible to turn off this warning for these files?
| >
| > Append -Wno-virtual-dtor.
| >
|
| Not available
It is since ages. There was a missing "-non" from my part. Try
-Wno-non-virtual-dtor
-- Gaby
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to turn off a warning in a file
2006-06-13 13:01 Fwd: Re: " robbie.doggie
@ 2006-06-13 15:38 ` Perry Smith
0 siblings, 0 replies; 6+ messages in thread
From: Perry Smith @ 2006-06-13 15:38 UTC (permalink / raw)
To: robbie.doggie; +Cc: gcc-help
On Jun 13, 2006, at 8:01 AM, robbie.doggie@gmx.net wrote:
>>
>> Append -Wno-virtual-dtor.
>
> Ok, but actually I'd like to keep it turned on for other files. In
> other compilers there's a possibility with #pragma. But I haven't
> found out whether that's possible with gcc, too.
As an alternative, GNU make has target specific variables so you can
have that flag set for particular object files and not for others.
They are pretty easy to use.
HTH,
pedz
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-16 18:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-13 11:23 How to turn off a warning in a file robbie.doggie
2006-06-13 11:33 ` Gabriel Dos Reis
2006-06-16 17:19 ` Paulo J. Matos
2006-06-16 18:46 ` Gabriel Dos Reis
2006-06-13 22:06 ` Christoph Bartoschek
2006-06-13 13:01 Fwd: Re: " robbie.doggie
2006-06-13 15:38 ` Perry Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).