This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: stab info for const fields
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Thu, 31 Oct 02 16:38:15 EST
- Subject: Re: Patch: stab info for const fields
It would be great to get all this junk out of DECLs, but it will
take some doing...
I'm still not sure it's moving in the right direction. Consider the
following in Ada:
type Myint is range 0..1000;
for Myint'size use 32;
type T is record f1, f2: Myint; end record;
X: T;
for X'size use 128;
This has X of type T, which is 64 bits, but X is 128 bits.
Currently, GNAT makes a special type for X which is a record of one
field. That field is of type T and the type for X has a size of 128 bits.
Then X is of that type.
But doing this means that all references to X need an implicit
COMPONENT_REF to extract the actual data. This is a mess.
If we allow the size of a decl to be larger than that of its type, we
can avoid this mess.