Bug 19648 - stl_alloc.h - increases required alignment of target type
Summary: stl_alloc.h - increases required alignment of target type
Status: VERIFIED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 3.1.1
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-26 21:42 UTC by Ben
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben 2005-01-26 21:42:53 UTC
Following are the warning in the compilation:

/tools/gcc/include/c++/3.1.1/bits/locale_facets.tcc:768: warning: declaration 
   of `__ctype' shadows a global declaration
/tools/gcc/lib/gcc-lib/sparc-sun-solaris2.8/3.1.1/include/iso/stdlib_iso.h:46: 
warning: shadowed
   declaration is here:w
/tools/gcc/include/c++/3.1.1/bits/stl_alloc.h: In static member function 
   `static void* std::__default_alloc_template<__threads, 
   __inst>::_S_refill(unsigned int) [with bool __threads = true, int __inst = 
   0]':
/tools/gcc/include/c++/3.1.1/bits/stl_alloc.h:394:   instantiated from `static 
void* std::__default_alloc_t
emplate<__threads, __inst>::allocate(unsigned int) [with bool __threads = true, 
int __inst = 0]'
/tools/gcc/include/c++/3.1.1/bits/stl_alloc.h:641:   instantiated from `_Tp* 
std::allocator<_Alloc>::alloca
te(unsigned int, const void*) [with _Tp = char]'
/tools/gcc/include/c++/3.1.1/bits/basic_string.tcc:443:   instantiated from 
`static std::basic_string<_Char
T, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, 
_Alloc>::_Rep::_S_create(unsigned int, const 
_Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = 
std::allocator<char>]'
/tools/gcc/include/c++/3.1.1/bits/basic_string.tcc:307:   instantiated from 
`void std::basic_string<_CharT,
 _Traits, _Alloc>::_M_mutate(_Alloc::size_type, _Alloc::size_type, 
_Alloc::size_type) [with _CharT = char, 
_Traits = std::char_traits<char>, _Alloc = std::allocator<char>]'
/tools/gcc/include/c++/3.1.1/bits/basic_string.h:409:   instantiated from `void 
std::basic_string<_CharT, _
Traits, _Alloc>::clear() [with _CharT = char, _Traits = std::char_traits<char>, 
_Alloc = std::allocator<cha
r>]'
bHlrMessage.h:477:   instantiated from here
/tools/gcc/include/c++/3.1.1/bits/stl_alloc.h:536: warning: cast from `char*' 
   to `std::__default_alloc_template<true, 0>::_Obj*' increases required 
   alignment of target type
/tools/gcc/include/c++/3.1.1/bits/stl_alloc.h:537: warning: cast from `char*' 
   to `std::__default_alloc_template<true, 0>::_Obj*' increases required 
   alignment of target type
/tools/gcc/include/c++/3.1.1/bits/stl_alloc.h:540: warning: cast from `char*' 
   to `std::__default_alloc_template<true, 0>::_Obj*' increases required 
   alignment of target type


Please help.
Comment 1 Andrew Pinski 2005-01-26 21:47:28 UTC
I think this is a dup of bug 8670 but I don't know since there is not enough information in this bug.

First what target is this.
Second could you try a newer compiler than 3.1.1 since 3.1.1 is old.
Comment 2 Paolo Carlini 2005-01-27 11:16:18 UTC
No this is an old issue, fixed by Gerald Pfeifer on May, 20, 2003 (cannot find
the PR #, sorry). No recent release is affected.
Comment 3 Ben 2005-01-27 14:27:16 UTC
Thank you, I will upgrade the compiler with the most latest version.