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


"Zack Weinberg" <zack@codesourcery.com> writes:

| Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
| 
| >   (1) format checking  is done when we use GCC (modulo versions).
| >   (2) the bootstrapping compiler is told (via attributes) what to check.
| >   (3) the attraibutes are hardwired in the files.
| >
| > the last point is what is causing the trouble.
| >
| > When the current front-end (which we want to build an executable for)
| > invokes the bootstrapping compiler, it is its responsability to tell
| > what is the set of format specifiers.  That set is specified
| > statically via -DGCC_DIAG_STYLE=__gcc_xxx__, not the way it is
| > currently done.  But statically. 
| 
| Okay, I understand this.  However, this suggests that you intend to
| compile files shared between front ends more than once, with different
| settings of GCC_DIAG_STYLE. 

Not really.  Remember, the whole thing is composed of two parts

   1) interface (.h files) translated every time they are included.
      These files are also the most shared files.
      This is where the attribute declarations are put.

   2) implementation (.c files) usually translated once.

I'm NOT proposing to translate implementation files multiple times.

-- Gaby


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