This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64383] missed warning for unused variable.
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Jan 2015 12:01:50 +0000
- Subject: [Bug c++/64383] missed warning for unused variable.
- Auto-submitted: auto-generated
- References: <bug-64383-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64383
--- Comment #2 from Pawel Sikora <pluto at agmk dot net> ---
(In reply to Manuel LÃpez-IbÃÃez from comment #1)
> A minimized testcase would be helpful. Using delta would probably remove
> already a lot: https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
one more small testcase w/o stl with missed warning.
struct Y
{
~Y(); // comment this line to get proper warning about 'unused y variable'
};
struct X
{
static Y& get();
};
int main()
{
Y& y = X::get();
}
clang 3.5.0 warns in both (w/ and w/o Y dtor) variants.