How to get rid of attribute(mode(word))?

Ian Lance Taylor iant@google.com
Sat Feb 3 01:50:00 GMT 2007


Eric Christopher <echristo@apple.com> writes:

> > One target is to identify more places where we can get rid of
> > _Unwind_Word.
> > Other places exist where we definitely need a data type like
> > _Unwind_Word
> > representing a general purpose register.  So we have to find a way
> > to define
> > _Unwind_Word without using the mode(word) attribute.
> 
> So, I might be missing something but I'm uncertain as to why you'd
> want to do this.

There was a long discussion about this a couple of months ago.  The
summary was that __attribute__ ((mode (word))) was considered harmful.
It's safe enough when you use it within a program, but when you start
to use in a data structure shared by different codes you run into ABI
problems.  A typical example is the eh_return_filter_mode target hook,
which was introduced (without documentation!) because Darwin needs to
access the same exception handling information with two different
values of word_mode.

Ian



More information about the Gcc mailing list