This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Another issue with diagnostic format-checker
Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
> Instead of insisting on hardwiring GCC_DIAG_STYLE (thus opening the
> door for all kinds of nightmarre) in files, I'll reiterate what I
> suggested earlier:
>
> GCC_DIAG_STYLE should be set by each individual front-end, directly.
>
> We already do this for other flags.
> An obvious way to do that is for each front-end Makefile to use
> something like
>
> -DGCC_DIAG_STYLE=__gcc_xxx__
>
> when compiling files used in that front end. That way, we don't depend
> on inclusion order, or file inclusion otherwise unnecessary.
If we cannot have it in header files, I would prefer an explicit
#define at the top of every .c file. Putting it in the Makefile
means (a) additional complexity in the Makefile, which we do not
need; (b) you have to go look somewhere else for this information.
zw