This is the mail archive of the gcc@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]

Re: Experiences using struct gcc_target


On Fri, Jul 06, 2001 at 12:24:58PM -0700, Zack Weinberg wrote:
> The situation with the rtx and tree typedefs is really getting out of
> hand.  It doesn't exactly belong, but I think we should put
> 
> struct rtx_def;
> union tree_node;
> typedef struct rtx_def *rtx;
> typedef union tree_node *tree;
> 
> at the end of system.h, and (incrementally) change the existing places
> that use 'struct rtx_def *' or 'union tree_node *' to use the typedefs
> instead.

You might consider an extra level of indirection:  put the forward
declarations and typedefs in their own header, and include the header in
system.h (or whereever).  I can envision something wanting to know about
the declarations without needing the other things from system.h (although
that concept may be invalid).

Phil

-- 
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC


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