[fpc-pascal] Macro expanding error

2022-01-25 Thread Ryan Joseph via fpc-pascal
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?

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Macro expanding error

2022-01-25 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal  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...

Regards,
Sven

>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal