proposed patch: protos for warning(), error()
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Wed Apr 15 09:32:00 GMT 1998
> From: Robert Lipe <robertl@dgii.com>
>
> > Ug and ug.
>
> "Ug"reed. :-)
>
> > You should just use `union tree_node *' in place of `tree'. C does let
>
> Oooh. I just made my first visit to tree.h. I didn't realize the
> definition of 'tree' was so simple.
>
> I just implemented your idea. Thanx!
>
> I plan to just stick in good ideas as they roll in, then submit a "for
> approval" patch when the dust settles.
>
> > you leave structures undefined. You would of course want a `union tree_node;'
> > just before the definitions to avoid the warning about not being declared.
>
> Actually, since toplev.h is included in tree.h after tree_node is
> declared, this isn't necessary.
>
> Is this too fragile?
> RJL
I'm not liking the ugliness factor here. Let's not jump
through too many hoops and introduce too many oddities just to avoid
some one time editing.
If you examine the current prototypes in tree.h/rtl.h, they
already have much of the contents of the proposed toplev.h file except
that fatal/error/warning are #ifdef'ed out. I think this is because
of the exact reason I gave regarding the conflicts with static copies
of `fatal'. Let's not enshrine this problem.
I suggest that we "do the right thing". I.e. include toplev.h
only in those files which use one or more of the relevant functions,
which link with toplev.o, and after including rtl.h/tree.h so we get
the proper definition for `tree'.
Yes, this involves more editing of .c files and Makefile.in,
but I'll volunteer to do it if Robert doesn't want to.
--Kaveh
--
Kaveh R. Ghazi Project Manager / Custom Development
ghazi@caip.rutgers.edu Icon CMT Corp.
More information about the Gcc
mailing list