public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17341] New: Bogus "unused parameter" warning with -O3
@ 2004-09-06 23:57 mckelvey at maskull dot com
  2004-09-06 23:59 ` [Bug c++/17341] " mckelvey at maskull dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: mckelvey at maskull dot com @ 2004-09-06 23:57 UTC (permalink / raw)
  To: gcc-bugs

This "unused parameter" warning shows up with optimization. The parameter is
actually used.


/usr/local/bin/g++ -c -O3 -DNDEBUG      -D__USE_STRING_INLINES=1
-pedantic-errors -Werror -ansi -fno-common -fstrict-aliasing -Wall
-Wold-style-cast -Wsign-promo -Wpointer-arith -Wconversion -Wundef
-Wwrite-strings -Winvalid-pch -Woverloaded-virtual -Wcast-qual
-finline-limit=5000 -Wextra -MMD      -fimplicit-templates -I. -I.. -o rot13.o
rot13.cc
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_tree.h:
In constructor `std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
_Alloc>::_Rb_tree(const _Compare&, const _Alloc&) [with _Key =
PatternDriver::pdstring, _Val = std::pair<const PatternDriver::pdstring,
PatternDriver::pdboolean>, _KeyOfValue = std::_Select1st<std::pair<const
PatternDriver::pdstring, PatternDriver::pdboolean> >, _Compare =
std::less<PatternDriver::pdstring>, _Alloc = std::allocator<std::pair<const
PatternDriver::pdstring, PatternDriver::pdboolean> >]':
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_tree.h:520:
warning: unused parameter '__a'
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_tree.h:
In constructor `std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
_Alloc>::_Rb_tree(const _Compare&, const _Alloc&) [with _Key =
PatternDriver::pdstring, _Val = std::pair<const PatternDriver::pdstring,
PatternDriver::pdstrings>, _KeyOfValue = std::_Select1st<std::pair<const
PatternDriver::pdstring, PatternDriver::pdstrings> >, _Compare =
std::less<PatternDriver::pdstring>, _Alloc = std::allocator<std::pair<const
PatternDriver::pdstring, PatternDriver::pdstrings> >]':
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_tree.h:520:
warning: unused parameter '__a'
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_tree.h:
In constructor `std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
_Alloc>::_Rb_tree(const _Compare&, const _Alloc&) [with _Key =
PatternDriver::pdstring, _Val = std::pair<const PatternDriver::pdstring,
PatternDriver::pdintegers>, _KeyOfValue = std::_Select1st<std::pair<const
PatternDriver::pdstring, PatternDriver::pdintegers> >, _Compare =
std::less<PatternDriver::pdstring>, _Alloc = std::allocator<std::pair<const
PatternDriver::pdstring, PatternDriver::pdintegers> >]':
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_tree.h:520:
warning: unused parameter '__a'
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_tree.h:
In constructor `std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
_Alloc>::_Rb_tree(const _Compare&, const _Alloc&) [with _Key =
PatternDriver::pdstring, _Val = std::pair<const PatternDriver::pdstring,
PatternDriver::pdfloats>, _KeyOfValue = std::_Select1st<std::pair<const
PatternDriver::pdstring, PatternDriver::pdfloats> >, _Compare =
std::less<PatternDriver::pdstring>, _Alloc = std::allocator<std::pair<const
PatternDriver::pdstring, PatternDriver::pdfloats> >]':
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_tree.h:520:
warning: unused parameter '__a'
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_tree.h:
In constructor `std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
_Alloc>::_Rb_tree(const _Compare&, const _Alloc&) [with _Key =
PatternDriver::pdstring, _Val = std::pair<const PatternDriver::pdstring,
PatternDriver::pdbooleans>, _KeyOfValue = std::_Select1st<std::pair<const
PatternDriver::pdstring, PatternDriver::pdbooleans> >, _Compare =
std::less<PatternDriver::pdstring>, _Alloc = std::allocator<std::pair<const
PatternDriver::pdstring, PatternDriver::pdbooleans> >]':
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/../../../../include/c++/3.5.0/bits/stl_tree.h:520:
warning: unused parameter '__a'
gmake: *** [rot13.o] Error 1


alpha1:PD>uname -a
Linux alpha1 2.4.9-40 #1 Mon Sep 23 08:14:02 EDT 2002 alpha unknown

alpha1:PD>g++ -v
Reading specs from /usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/specs
Configured with: ../gcc/configure --verbose --enable-languages=c++
Thread model: posix
gcc version 3.5.0 20040207 (experimental)

Configured:
alpha1:PD>alias CONFIGURECVS
alias CONFIGURECVS='../gcc/configure --verbose --enable-languages=c++
--disable-nls >clog 2>&1'

Built:
alpha1:PD>alias BUILD
alias BUILD='nice gmake CFLAGS='\'''\'' BOOT_CFLAGS='\''-O'\'' LIBCFLAGS='\''-g
-O'\'' LIBCXXFLAGS='\''-g -O'\'' bootstrap >log 2>&1'

-- 
           Summary: Bogus "unused parameter" warning with -O3
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mckelvey at maskull dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: alphaev56-unknown-linux-gnu
  GCC host triplet: alphaev56-unknown-linux-gnu
GCC target triplet: alphaev56-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17341


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-09-12 19:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-06 23:57 [Bug c++/17341] New: Bogus "unused parameter" warning with -O3 mckelvey at maskull dot com
2004-09-06 23:59 ` [Bug c++/17341] " mckelvey at maskull dot com
2004-09-07  8:58 ` [Bug c++/17341] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-09-09  3:41 ` pinskia at gcc dot gnu dot org
2004-09-09 10:11 ` giovannibajo at libero dot it
2004-09-12 19:02 ` mckelvey at maskull dot com
2004-09-12 19:08 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).