2015-08-18 15:17:31 UTC
In (informative) section J.1, listing unspecified behaviors, one
of the listed items reads as follows:
When a fully expanded macro replacement list contains a
function-like macro name as its last preprocessing token and
the next preprocessing token from the source file is a (,
and the fully expanded replacement of that macro ends with
the name of the first macro and the next preprocessing token
from the source file is again a (, whether that is
considered a nested replacement (6.10.3).
My question is easy to state but may not be easy to answer.
Which normative text gives rise to this result? More
specifically, since the normative text doesn't mention this
situation explicitly, apparently the text must have an ambiguity
that admits the two possibilities mentioned above. What part of
the normative text allows this ambiguous reading, and by what
reasoning must that text be read as ambiguous (ie, considering
just normative text)? To ask the question another way, if we
only had normative text available, what would lead us to conclude
that the result given in J.1 must apply, rather than some other
result, eg, that the given circumstance should always count as a
nested replacement (or alternatively, that it should never count
as a nested replacement)?