public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/23528] New: Wrong default allocator in ext/hash_map
@ 2005-08-23 12:01 mattias dot ellert at tsl dot uu dot se
  2005-08-23 12:02 ` [Bug libstdc++/23528] " mattias dot ellert at tsl dot uu dot se
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: mattias dot ellert at tsl dot uu dot se @ 2005-08-23 12:01 UTC (permalink / raw)
  To: gcc-bugs

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<const int, int>*' in
initialization
hashtest.cxx:12: error: no matching function for call to
`std::allocator<int>::construct(std::pair<const int, int>*&, std::pair<const
int, int>&)'
/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<int>::destroy(std::pair<const int, int>*&)'
/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<int>::deallocate(std::pair<const int, int>*&, 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


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

end of thread, other threads:[~2005-08-29 22:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-23 12:01 [Bug libstdc++/23528] New: Wrong default allocator in ext/hash_map mattias dot ellert at tsl dot uu dot se
2005-08-23 12:02 ` [Bug libstdc++/23528] " mattias dot ellert at tsl dot uu dot se
2005-08-23 12:27 ` mattias dot ellert at tsl dot uu dot se
2005-08-23 12:45 ` [Bug libstdc++/23528] [3.4 Regression] " pinskia at gcc dot gnu dot org
2005-08-23 13:16 ` pcarlini at suse dot de
2005-08-23 13:26 ` pinskia at gcc dot gnu dot org
2005-08-23 13:35 ` pcarlini at suse dot de
2005-08-23 13:42 ` pcarlini at suse dot de
2005-08-23 13:43 ` pcarlini at suse dot de
2005-08-23 13:55 ` pinskia at gcc dot gnu dot org
2005-08-23 14:16 ` pcarlini at suse dot de
2005-08-23 17:25 ` mattias dot ellert at tsl dot uu dot se
2005-08-23 18:28 ` pcarlini at suse dot de
2005-08-29 22:21 ` pcarlini at suse dot de

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