[fpc-devel] {$DEFINE x := something}

Gerhard Scholz gs at g--s.de
Wed Jun 29 16:39:53 CEST 2005

This repairs two bugs concerning macros:

There is a check that the macro name is not a reserved keyword. If the macro
name starts not with a letter (with other words: starts with an underline),
the compiler fails (when it is compiled with $R+).

The check should be done when it is clear that the macro is of the form
    {$DEFINE x := something}

When the define has the standard form
    {$DEFINE x}
no check should be done, as before, and as now if you have {$MACRO off]

The attached code pieces, when inserted into scanner.pas, will repair the

My changes in the code are marked with #gs#0#, at three locations.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: corrections_in_scanner.pas
Type: application/octet-stream
Size: 4486 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20050629/026432a5/attachment.obj>

More information about the fpc-devel mailing list