[fpc-pascal] Macro expanding error

Sven Barth pascaldragon at googlemail.com
Wed Jan 26 07:57:26 CET 2022

Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am
Mi., 26. Jan. 2022, 03:18:

> I have this macro:
> {$define TCallback := TCallback2}
> which gives a long list of these errors.
> warning: Expanding of macros exceeds a depth of 16.
> What does this warning mean and how can I resolve it?

I did not look at the code, so just a guess: the compiler tries to replace
the "TCallback" within the "TCallback2" after it applied the macro leading
to add infinitum expansions. This would be wrong, cause the macros should
work on whole identifiers and not parts of them...


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220126/08a25b1e/attachment.htm>

More information about the fpc-pascal mailing list