public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13482] New: -Wall -W and -Wunused do not behave as documented
@ 2003-12-23 22:44 boris at kolpackov dot net
  2003-12-24 18:30 ` [Bug c++/13482] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: boris at kolpackov dot net @ 2003-12-23 22:44 UTC (permalink / raw)
  To: gcc-bugs

$ cat >test.cpp
void bar ();

void foo (int const& a)
{
  try
  {
    bar ();
  }
  catch (int const& e)
  {
    bar ();
  }
}

$ g++ --version
g++ (GCC) 3.3 (Debian)

$ g++ -c ./test.cpp
$ g++ -Wunused -c ./test.cpp
$ # would expect two warnings here
$ g++ -Wall -c ./test.cpp
$ # would expect two warnings here
$ g++ -W -Wunused -c ./test.cpp
test.cpp: In function `void foo(const int&)':
test.cpp:4: warning: unused parameter `const int&a'
$ # doc never said I should use -W to make -Wunused work
$ # only one warning
$ # also note how ugly `const int&a' looks
$ g++ -W -Wall -c ./test.cpp
test.cpp: In function `void foo(const int&)':
test.cpp:4: warning: unused parameter `const int&a'
$ # again only one warning

-- 
           Summary: -Wall -W and -Wunused do not behave as documented
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: boris at kolpackov dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-gnu-linux
  GCC host triplet: i386-gnu-linux
GCC target triplet: i386-gnu-linux


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


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

end of thread, other threads:[~2003-12-24 21:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-23 22:44 [Bug c++/13482] New: -Wall -W and -Wunused do not behave as documented boris at kolpackov dot net
2003-12-24 18:30 ` [Bug c++/13482] " pinskia at gcc dot gnu dot org
2003-12-24 18:30 ` pinskia at gcc dot gnu dot org
2003-12-24 21:12 ` pinskia at gcc dot gnu dot org
2003-12-24 21:13 ` pinskia at gcc dot gnu dot org
2003-12-24 21:38 ` boris at kolpackov dot net

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).