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]
Other format: [Raw text]

Re: Patch: stab info for const fields


In general I think we encode way too much information in DECLs which
is redundant with their TYPEs.  Off the top of my head: I don't see
any legitimate reason why the size, size_unit, arguments, attributes,
and possibly pointer_alias_set fields, and a bunch of the flags should
ever differ from the corresponding field in TREE_TYPE (decl).
I very much agree with this, in spirit.  There may be things in some
languages that somehow make these things different, but I'm not sure what.
You carefully left out alignment; the GNU attribute extensions do allow
you to align variables differently from their types -- though I have
argued in the past that this is an abuse of the notion of type.  There
are other attributes (like "unused") that do make sense for a variable
independently of its type, though.

--
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


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