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

Peter Vreman peter at freepascal.org
Wed Jun 29 17:05:46 CEST 2005


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

Next time please supply diffs (svn diff > mypatch.diff) of the changes
that you make. And also don't change the sourcecode style. If makes huge
diffs and applying of patches will take a lot of manual work and time.







More information about the fpc-devel mailing list