[fpc-devel] Declare variables inside the code

Joerg Schuelke joerg.schuelke at gmx.de
Fri May 13 17:23:11 CEST 2011


Am Thu, 12 May 2011 09:32:28 +0200
schrieb Michael Schnell <mschnell at lumino.de>:

> > I would introduce a macro expansion trough a compiler directive.  
> What a bout a compiler directive to optionally call the gnu C 
> preprocessor ? I would have wanted used this some time ago for a very 
> special project.

Yesterday I thought this would be jocular, today, that I
misunderstood your suggestion. If it is for some circumstances not
possible to have the preprocessor integrated in the compiler this is an
possibility to do automatic preprocessing.

I thought of preprocessing the definitions and expansions of macros by
compiler switches yesterday and thats why my answer.

If you call a preprocessor as an hook of the compiler by compiler
directive then including the result in the usual way, you only have to
get rid of the rest of the source file, I mean the original one which
is processed by the compiler right bevor preprocessor hook call.

This sounds not that ridiculous.

It would be the second chance if it is impossible to incorporate an
preprocessor in the compiler. But,..., there is so much work done twice
this way, the whole scanning process is doubled..., that would be a
pity.

Regards
	Jörg



More information about the fpc-devel mailing list