On Thu, Apr 30, 2015 at 02:33:44PM +0200, Jakub Jelinek wrote:
> On Thu, Apr 30, 2015 at 08:25:14AM -0400, Trevor Saunders wrote:
> > On Thu, Apr 30, 2015 at 08:40:50AM +0200, Andreas Schwab wrote:
> > > Trevor Saunders <tbsau...@tbsaunde.org> writes:
> > > 
> > > > actually pointing out libojc/encoding.c was more useful since that makes
> > > > it pretty clear the ifndef PCC_BITFIELD_TYPE_MATTERS there just needs to
> > > > be changed to #if !
> > > 
> > > That probably won't work on arm or powerpc or vax:
> > > 
> > > gcc/config/arm/arm.h:#define PCC_BITFIELD_TYPE_MATTERS TARGET_AAPCS_BASED
> > > gcc/config/rs6000/sysv4.h:#define PCC_BITFIELD_TYPE_MATTERS 
> > > (TARGET_BITFIELD_TYPE)
> > > gcc/config/vax/vax.h:#define PCC_BITFIELD_TYPE_MATTERS (! 
> > > TARGET_VAXC_ALIGNMENT)
> > 
> > hrmph, I don't see how this code ever worked correctly on those targets.
> > Consider the arm case the value of PCC_BITFIELD_TYPE_MATTERS depends on
> > arm_abi so if the bitfield type matters depends on what abi libobjc is
> > being built for, but its not obvious how libobjc is dealing with that.
> > I suppose it could be that libobjc is using this macro to know something
> > else that only sort of relaed somehow.  Unfortunately this code seems to
> > come from the creation of libobjc/ in 11998 and though the commit says
> > it is a move from gcc/objc/ nothing appears to have been removed from
> > gcc/objc/.
> > 
> > I guess the "best" thing to do is justadd a
> > __PCC_BITFIELD_TYPE_MATTERS__ that gcc defines and use that in libobjc?
> 
> I think adding way too many predefines, especially rarely used ones, is
> harmful, certainly it isn't free, consider -g3 or -dD where it will all end
> up in, additional gcc start overhead, ... 

there was a reason I said "best" I don't think its a great design
either.

> Can't just libobjc configury test for that?

I suppose it can test what happens with alignment of different types in
structs.  I guess I'm not really awake yet, and I'm pretty wary of
this since I really have no idea what its trying to do.

Trev

> 
>       Jakub

Reply via email to