This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17393] New: "unused variable '._0'" warning with -Wall
- From: "timoe at cs dot tut dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2004 12:22:16 -0000
- Subject: [Bug c++/17393] New: "unused variable '._0'" warning with -Wall
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hello,
I found this minor bug that produces a wrong warning message
just recently. The following erroneous source code,
when compiled with -Wall
struct A { };
void foo()
{
A& = a;
}
results in this output:
g++ -Wall foo.cc
foo.cc: In function `void foo()':
foo.cc:5: error: abstract declarator `A&' used as declaration
foo.cc:5: error: `a' undeclared (first use this function)
foo.cc:5: error: (Each undeclared identifier is reported only once for each
function it appears in.)
foo.cc:5: warning: unused variable '._0'
Here are the configuration options of the compiler:
Reading specs from
/share/local/lang/gcc341-sol7/bin/../lib/gcc/sparc-sun-solaris2.7/3.4.1/specs
Configured with: ../../gcc-3.4.1/configure --prefix=/opt/local/lang/gcc341-sol7
--enable-shared --enable-cpp --disable-threads --with-gnu-ld
--with-ld=/opt/local/lang/gcc341-sol7/bin/ld --with-gnu-as
--with-as=/opt/local/lang/gcc341-sol7/bin/as --with-cpu=supersparc --disable-nls
--disable-multilib --enable-c99 --enable-concept-checks --with-dwarf2
--enable-languages=c,c++
Thread model: single
gcc version 3.4.1
Yours,
Timo Erkkilä
--
Summary: "unused variable '._0'" warning with -Wall
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: timoe at cs dot tut dot fi
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: sparc-sun-solaris2.7
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17393