diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-01-07 02:38:32 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-01-07 02:38:32 +0000 |
commit | c10cdb3d75dcd62c2eaf97fe805fe642f9d21585 (patch) | |
tree | a93ea5a939facd41940dce73c3b3ff15a67d5079 /gcc/testsuite | |
parent | 69f794a7090bf4bc4c0d902def487e2fb5c37ebc (diff) | |
download | gcc-c10cdb3d75dcd62c2eaf97fe805fe642f9d21585.zip gcc-c10cdb3d75dcd62c2eaf97fe805fe642f9d21585.tar.gz gcc-c10cdb3d75dcd62c2eaf97fe805fe642f9d21585.tar.bz2 |
re PR c++/9165 (false "defined but not used" warnings)
PR c++/9165
* decl2.c (build_cleanup): Mark the object as used.
PR c++/9165
* g++.dg/warn/Wunused-3.C: New test.
From-SVN: r60972
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wunused-3.C | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8b4fce3..2ae7060 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,9 @@ 2003-01-06 Mark Mitchell <mark@codesourcery.com> - * testsuite/g++.dg/abi/bitfield9.C: New test. + PR c++/9165 + * g++.dg/warn/Wunused-3.C: New test. + + * g++.dg/abi/bitfield9.C: New test. PR c++/9189 * g++.dg/parse/defarg3.C: New test. diff --git a/gcc/testsuite/g++.dg/warn/Wunused-3.C b/gcc/testsuite/g++.dg/warn/Wunused-3.C new file mode 100644 index 0000000..3100909 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wunused-3.C @@ -0,0 +1,11 @@ +// { dg-do compile } +// { dg-options "-Wunused -O" } + +void do_cleanups(); + +class Cleanup { +public: + ~Cleanup() { do_cleanups();} +}; + +static Cleanup dummy; |