From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11172 invoked by alias); 23 Dec 2003 20:50:31 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11161 invoked by uid 48); 23 Dec 2003 20:50:29 -0000 Date: Tue, 23 Dec 2003 22:44:00 -0000 From: "boris at kolpackov dot net" To: gcc-bugs@gcc.gnu.org Message-ID: <20031223205018.13482.boris@kolpackov.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13482] New: -Wall -W and -Wunused do not behave as documented X-Bugzilla-Reason: CC X-SW-Source: 2003-12/txt/msg02510.txt.bz2 List-Id: $ 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