This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: disentangle errors.h vs toplev.h includes
> DJ Delorie <email@example.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 R. Ghazi firstname.lastname@example.org