This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: stab info for const fields
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Oct 2002 12:51:38 -0800
- Subject: 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