This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: compilercache, important question on preprocessor stuff
- To: Erik Thiele <erikyyy at erikyyy dot de>
- Subject: Re: compilercache, important question on preprocessor stuff
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 12 Apr 2001 10:02:35 -0300
- Cc: gcc at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <20010412143049.A19141@vulcain.yyydom>
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