libstdc++/8246: Cast increases alignment in __default_alloc_template on Sparcs

john.carter@tait.co.nz john.carter@tait.co.nz
Wed Oct 16 15:16:00 GMT 2002


>Number:         8246
>Category:       libstdc++
>Synopsis:       Cast increases alignment in __default_alloc_template on Sparcs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 16 15:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     john.carter@tait.co.nz
>Release:        Latest in CVS at 17/Oct/2002 (1.24 of bits/stl_alloc.h)
>Organization:
>Environment:
Sparc (non i386)
>Description:
Cast increases alignment problem.

In bits/stl_alloc.h line  364:
       static char*                  _S_start_free;
Should be declared pointer to _Obj, otherwise places such as
line 503:             
  ((_Obj*)_S_start_free) -> _M_free_list_link = *__my_free_list;
whinge (rightly) that cast increases alignment.
>How-To-Repeat:

>Fix:
Change declaration of _S_start_free and then use appropriate member.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list