This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/2139: Annoying C++ warning



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]