This is the mail archive of the gcc-patches@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]

Re: g++ 3.1 EH broken for irix6.5


On Fri, Jun 29, 2001 at 07:54:12AM -0400, Richard Kenner wrote:
> We can easily make this front-end-dependent, but it would be a shame to
> be providing a feature to Ada users that C users can't take advantage of.

Eh.  Not that much of a shame.  We can always invent another
attribute later if we _really_ need it.

>     The answer is probably to have the packed attribute also set
>     TYPE_USER_ALIGN or DECL_USER_ALIGN or whatever is appropriate,
>     possibly with an additional bit set to let the layout routines know
>     that these alignments are to override ABI defaults rather than augment
>     ABI defaults.
> 
> I don't follow.

At the moment, attribute packed only sets TYPE_PACKED or DECL_PACKED.
The suggestion is to make these tree bits do what you think -- only
affect packing.

Now, we also need some way to affect alignment as we did before.
The trick is that if we see attribute aligned all by itself, it
should be ignored unless the alignment is greater than the natural
alignment.  So we need another bit that says that user alignment
should override natural alignment.  Call this bit USER_ALIGN_FORCE.

Then we have

	case A_PACKED:
	  if (is_type)
	    {
	      TYPE_PACKED (type) = 1;
	      TYPE_USER_ALIGN_FORCE (type) = 1;
	      if (! TYPE_USER_ALIGN (type))
		{
		  TYPE_USER_ALIGN (type) = 1;
		  TYPE_ALIGN (type) = 1;
		}
	    }
	  ...


r~


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