non virtual dtor warning
James Tebneff
tebneff@gmail.com
Mon Feb 25 03:32:00 GMT 2008
Hello,
I would like to disable the warning for non virtual destructor's.
E.g.
$ cat t.c
struct A{ A(){} };
struct B : A { B(){} };
int main()
{
}
g++-svn -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/home/jtebneff/beta
--program-suffix=-svn --enable-languages=c,c++
Thread model: posix
gcc version 4.4.0 20080224 (experimental) [trunk revision 132136] (GCC)
g++-svn -Weffc++ -Wnon-virtual-dtor t.c
t.c:2: warning: base class struct A has a non-virtual destructor
g++-svn -Weffc++ -Wno-non-virtual-dtor t.c
t.c:2: warning: base class struct A has a non-virtual destructor
Is there a -Wno analogue for every option or is it not possible to
disable this warning?
I had a quick look at options.c and diagnostics.c in the sources but
was not able to find the relevant place where the warning is handled.
So my question is:
Is it possible to use -Wno-non-virtual-dtor or otherwise to disable
that warning?
Thanks,
JT
More information about the Gcc-help
mailing list