[fpc-devel] Macro Patch

Joerg Schuelke joerg.schuelke at gmx.de
Mon May 9 13:24:26 CEST 2011


Some days ago I stated that the build-in macros %LINE% and %FILE%, used
inside a macro, expand to the wrong (in my opinion) info from the
defining context and not to those from the expanding context.

That makes them nearly useless, because using them inside a macro for
debugging purposes is their main benefit.

I wrote two small changes for scanner.pas and fmodule.pas which solve
the problem. Maybe the devils are interested in applying it, or
something similar.

The 'unknown' from my changes are in real Internal-Errors, which should
never occur. But changing this let's trying him to find an Environment-
Variable with the same name, which gives a Warning. So ...

Best regards
	Jörg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: macro-patch.diff
Type: text/x-patch
Size: 2092 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110509/0d65b7db/attachment.bin>


More information about the fpc-devel mailing list