[fpc-devel] Macro Processing

Daniël Mantione daniel.mantione at freepascal.org
Sat May 14 16:29:15 CEST 2011

Op Sat, 14 May 2011, schreef Joerg Schuelke:

> Am Sat, 14 May 2011 12:14:52 +0200
> schrieb Florian Klämpfl <florian at freepascal.org>:
>> Because a lot of code in the compiler is very old (remember, it was
>> started in 1993 using TP) and writestr for enums is new compare with
>> this time span. Nobody rewrote the code yet.
> And it should not been rewritten this way, because this would force the
> use of RTTI information inside the compiler , which is needless.

It's not needless, it's usefull :)

This code:

   type colour=(red,green,blue);


... will cause 52 bytes of RTTI data to be inserted in your executable. 
Any do-it-yourself solution will consume more space. Therefore the RTTI 
not only helps to keep the source code compact and therefore readable, it 
would also help to keep the compiler exe compact.

So use of RTTI information inside the compiler is most welcome :)


More information about the fpc-devel mailing list