DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT

Geoff Keating geoffk@geoffk.org
Thu Apr 10 16:39:00 GMT 2003


Ulrich Weigand <weigand@immd1.informatik.uni-erlangen.de> writes:

> However, Ada bootstrap still fails, because it uses 
> inconsistent alignment flags for the same symbol between
> different translation units:  the elaboration check flag
> variables are defined from within Ada sources, and marked
> as forced 1-byte aligned there, but they are *referenced*
> from within auto-generated C sources, and are declared
> simply as 'extern char xxx;' there, without any forced
> alignment specification.
> 
> This means that when compiling the C source that references
> the variables, I do not know that they are in fact 1-byte
> aligned.  Do you think the backend should be able to cope
> with even this scenario, or would you consider this a 
> frontend bug?

I'd consider this a bug *somewhere*.  I'd think that if the Ada
frontend is going to do this, then in the C sources the variables need
to be marked with the appropriate alignment.

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc mailing list