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]: disentangle errors.h vs toplev.h includes


 > DJ Delorie <dj@redhat.com> writes:
 > 
 > | > The implementations of the error functions are completely different.
 > | 
 > | Specifically, the ones for the generator file don't need the new
 > | OPT_* parameter.
 > | 
 > | Can we name them differently to preclude future confusions?  Like
 > | gwarning() for the generator files' warnings?
 > 
 > Yes, that is a good idea.
 > -- Gaby

Well rtl.c and varray.c link against both separately.  So giving the
functions different names would necessitate #ifdef GENERATOR_FILE
clauses wherever diagnostics are issued from those files.

I've submitted a patch to put printf attributes on the errors.h
prototypes so if someone mistakenly includes errors.h and tries to use
any of the GCC specific format specifiers (e.g. %H) they'll get
spanked.  That should keeps things from regressing.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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