[Bug c++/39526] New: -Wshadow reports shadowed declarations for parameters of unnamed temp objects
caolanm at redhat dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 23 12:22:00 GMT 2009
for the parameters passed to a C++ constructor when an unnamed temporary object
is created and a method called on it
i.e. following test-case reports...
$ g++ -c -Wshadow demo.cxx
demo.cxx: In function Âint foo(int)Â:
demo.cxx:10: warning: declaration of ÂINetURLObject infoo shadows a parameter
demo.cxx:8: warning: shadowed declaration is here
$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl
--with-cloog=/builddir/build/BUILD/gcc-4.4.0-20090307/cloog-ppl/inst/usr
--with-tune=generic --with-arch_32=i586 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.0 20090307 (Red Hat 4.4.0-0.23) (GCC)
--
Summary: -Wshadow reports shadowed declarations for parameters of
unnamed temp objects
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: caolanm at redhat dot com
GCC target triplet: x86_64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39526
More information about the Gcc-bugs
mailing list