This is the mail archive of the 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: Another issue with diagnostic format-checker

"Zack Weinberg" <> writes:

| Gabriel Dos Reis <> 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.

Defining it at the top of every .c file does not make the core problem
go away -- in fact it is no different from what Kaveh did. 

| Putting it in the Makefile
| means (a) additional complexity in the Makefile, which we do not

No more complexity than already in place: Every front-end already has
to pass its own flags.  It is not like this would add more complexity
in the Makefiles.

| need; (b) you have to go look somewhere else for this information.

No more than you have to do currently.  You already have to go look
somewhere else for this information.  What I'm suggesting is that,
since "going look somwhere else for this information" is already
required, just make it useful and flexible.
Inclusion order dependency is not useful. It is neither flexible.

-- Gaby

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