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]
Other format: [Raw text]

[Bug libstdc++/64798] [5 regression] g++.old-deja/g++.eh/badalloc1.C FAILs


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64798

--- Comment #14 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 27 Jan 2015, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64798
> 
> --- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I 
> think aligned attribute is similarly useless for this, I'd really go for 
> testing alignments you need, rather than expecting some magic value.  
> I'm not aware of any target that would have bigger alignment for say 
> char/short/int/long than long long, ditto with float/double, so I'd just 
> check maximum of long long, long double, void * alignment.

For the actual bug I can use __alignof__ (__cxa_refcounted_exception),
but that again ends up using __attribute__((__aligned__)) via the
_Unwind_Exception member:

struct _Unwind_Exception
{
  _Unwind_Exception_Class exception_class;
  _Unwind_Exception_Cleanup_Fn exception_cleanup;

#if !defined (__USING_SJLJ_EXCEPTIONS__) && defined (__SEH__)
  _Unwind_Word private_[6];
#else
  _Unwind_Word private_1;
  _Unwind_Word private_2;
#endif

  /* @@@ The IA-64 ABI says that this structure must be double-word 
aligned.
     Taking that literally does not make much sense generically.  Instead 
we
     provide the maximum alignment required by any type for the machine.  
*/
} __attribute__((__aligned__));

so I think that using __attribute__((__aligned__)) is very much the
correct and easiest thing to use.


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