On Tue, May 17, 2005 at 01:08:29PM -0400, Daniel Berlin wrote:
Depending on what field, yes, I'll object. There should be a "minimal decl" for which the "normal" decl stuff should belong to. DECL_ALIGN, for instance.
But you probably shouldn't have been doing that in the first place :)
I'm strongly in support of doing what Daniel wants to do. I've been wanting to do it since forever.
In fact, the only things that are probably common to *all* DECLs are (a) a name, and (b) a source position, and (c) a scope.
DECL_ALIGN certainly doesn't apply to namespaces, or enumeration constants, or type declarations. (Well, it might presently apply to type declarations, but it shouldn't; if someone declares an aligned type that should show up on the type.) I'm not sure if DECL_ALIGN applies to functions; maybe it could.
It's perfectly reasonable to have "typed_decl" as a derived class of "decl" which contains a type; then "var_decl" and "function_decl" would be derived from that, for example.
-- Mark Mitchell CodeSourcery, LLC [EMAIL PROTECTED] (916) 791-8304