This repairs two bugs concerning macros:

1.
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+).

2.
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
situation.

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

Gerhard

Attachment: corrections_in_scanner.pas
Description: Binary data

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to