This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/2139: Annoying C++ warning
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2139: Annoying C++ warning
- From: Sylvain Pion <Sylvain dot Pion at sophia dot inria dot fr>
- Date: Thu, 1 Mar 2001 17:05:26 +0100
- Cc: Sylvain Pion <Sylvain dot Pion at sophia dot inria dot fr>
>Number: 2139
>Category: c++
>Synopsis: Annoying C++ warning
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Mar 01 08:06:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Sylvain Pion
>Release: 3.0 20010301 (prerelease)
>Organization:
>Environment:
System: Linux zosma 2.2.14 #1 SMP Fri Jan 14 14:39:36 MET 2000 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /u/zosma/0/prisme/spion/gcc/gcc/configure --with-as=/u/zosma/0/prisme/spion/gcc/Binutils/Linux/bin/as --with-ld=/u/zosma/0/prisme/spion/gcc/Binutils/Linux/bin/ld --enable-languages=c++ --prefix=/u/zosma/0/prisme/spion/gcc/Linux_CVS_v3
>Description:
The program below gives the following warning when compiled with "g++ -W -Wall".
gcc/Linux_CVS_v3/include/g++-v3/bits/stl_alloc.h: In method
`std::exception::exception(const std::exception&)':
gcc/Linux_CVS_v3/include/g++-v3/exception:41: warning: unused parameter `const
std::exception&_ctor_arg'
This is very annoying as it seems to happen for every file that instantiates
an std::allocator.
>How-To-Repeat:
#include <memory>
int main()
{
std::allocator<int> S;
(void) S.allocate(1);
return 0;
}
>Fix:
I don't know of any really acceptable workaround. -Wno-unused works though.
>Release-Note:
>Audit-Trail:
>Unformatted: