This is the mail archive of the
mailing list for the GCC project.
Re: PR18173 - can't force alignment of global arrays with static initializer?
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: rth at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Nov 04 21:14:57 EST
- Subject: Re: PR18173 - can't force alignment of global arrays with static initializer?
Yes. Mark and Kenner have argued about this in the past at length.
Indeed. The issue is this:
If you want to have a decl at a larger size and/or larger alignment that its
type (it's clear you can't have it *smaller* in either), can you simply do
that by setting DECL_* to be those larger values or do you have to make a
type of that larger size and alignment and make the decl be of that type?
If you have to make the type, then DECL_MODE, DECL_SIZE, DECL_SIZE_UNIT,
DECL_ALIGN, DECL_USER_ALIGN, and probably DECL_UNSIGNED can be removed.
Right now, we have the worst of both worlds: we have the fields, require the
type to be made and set the fields to the same value as that of the type.
(I don't want to reopen the discussion again right now since this is not a
good time in the development process, but just wanted to remind folks what
the issue was all about.)