[fpc-pascal]Extension of macros exceeds a depth of 16
Olle Raab
olle.r at automagika.se
Wed Aug 4 13:39:58 CEST 2004
04-07-28 21.42, skrev Alan Mead följande:
> As a I mentined earlier today in a different thread, I have upgraded
> to 1.9.4 and I appreciate the greater checking.
>
> Most of the new warnings I get are clear but one of my units now
> reports "Extension of macros exceeds a depth of 16". What does this
^^^^^^^^^^
Actually I think the warning message is wrong..
It should imo be "Expanding". I'll fix this.
> warning mean and what is the rammification of ignoring it?
>
> The line number where it reports the warning is an {$if def ...} and
> I would assume the warning had something to do with nesting compiler
> conditionals... but that's not the case (unless the parser is really
> getting lost... but since the code operates, I cannot imagne that
> this is happening..). This conditional should be at the "top
> level"--it is not nested under anything.
It the recursive macro substitution which exceeds a depth of 16.
This is probably due to a circular definition of a macro, e g
{$DEFINE X = X}
So that X is replaced by X, which is replaced by X etc. This is probably not
what you want.
After 16 replacements the recursion is stoped, thats what it is warned
about.
Olle
More information about the fpc-pascal
mailing list