From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 732 invoked by alias); 23 Aug 2005 11:58:35 -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 709 invoked by uid 48); 23 Aug 2005 11:58:29 -0000 Date: Tue, 23 Aug 2005 12:01:00 -0000 From: "mattias dot ellert at tsl dot uu dot se" To: gcc-bugs@gcc.gnu.org Message-ID: <20050823115827.23528.mattias.ellert@tsl.uu.se> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libstdc++/23528] New: Wrong default allocator in ext/hash_map X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg02668.txt.bz2 List-Id: The attached testcase compiles and runs correctly with gcc 3.3.4, but gives the following compilation errors with gcc 3.4.4: hashtest.cxx: In function `int main()': hashtest.cxx:11: error: cannot convert `int*' to `std::pair*' in initialization hashtest.cxx:12: error: no matching function for call to `std::allocator::construct(std::pair*&, std::pair&)' /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ext/new_allocator.h:96: note: candidates are: void __gnu_cxx::new_allocator<_Tp>::construct(_Tp*, const _Tp&) [with _Tp = int] hashtest.cxx:17: error: no matching function for call to `std::allocator::destroy(std::pair*&)' /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ext/new_allocator.h:99: note: candidates are: void __gnu_cxx::new_allocator<_Tp>::destroy(_Tp*) [with _Tp = int] hashtest.cxx:18: error: no matching function for call to `std::allocator::deallocate(std::pair*&, int)' /usr/lib/gcc/i386-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ext/new_allocator.h:86: note: candidates are: void __gnu_cxx::new_allocator<_Tp>::deallocate(_Tp*, size_t) [with _Tp = int] The reason for the errors are wrong default allocators in ext/hash_map. A patch that fixes the problem is attached. -- Summary: Wrong default allocator in ext/hash_map Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mattias dot ellert at tsl dot uu dot se CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23528