This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: g++ 3.1 EH broken for irix6.5
- To: rth at redhat dot com
- Subject: Re: g++ 3.1 EH broken for irix6.5
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Fri, 29 Jun 01 07:54:12 EDT
- Cc: gcc-patches at gcc dot gnu dot org
> Well, the question then is how do you specify that the type should be
> packed by not "under-aligned"?
At the moment, you can't. You can get very close with packed+aligned,
but you have to know how much alignment to give the structure.
Exactly and that's the key point: you can't specify that alignment in a
portable way.
I'll interpret this as "how can we disentangle them within the
compiler" not "how can we disentagle them in the user accessible
attributes". The later isn't very interesting I don't think -- we've
never seen a need for it before, and I wouldn't want to invent
something just because.
Well it comes up quite often in Ada: there "packed" means just what it
says and the user does not expect unnecessary performance degradation due
to chosing a smaller-than-necessary alignment.
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.
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.