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]

Re: compilercache, important question on preprocessor stuff


On Apr 12, 2001, Erik Thiele <erikyyy@erikyyy.de> wrote:

> the gnu compiler is divided into preprocessing stage and the "rest".

Are you aware that the current preprocessor is integrated into the
compiler?

> so far i am assuming, only the lines starting "#pragma" are important,
> all the rest can be erased. is this correct or am i missing something?

Nope.  After `#pragma implementation "headerfile.h"', GCC will be
looking for occurrences of `# <line-number> "headerfile.h"' to get the
implementation part of the header emitted in the translation unit.

> why don'T you use stuff like __attribute__((pragma implementation))
> or so, which would be much cleaner?

Do you mean something like

#include <headerfile.h> __attribute__ ((pragma implementation)) ?

Or perhaps you mean something like:

#include <headerfile.h> _Pragma ("GCC implementation")

In any case, the preprocessor would have to pass some information to
the compiler to indicate boundaries between headerfile.h and other
headers it includes.  And the preprocessor would have to understand
pragmas.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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