wrote:
> Victor Bazarov wrote:
>> wrote:
[snipped question about whether arithmetic computations on literals are
performed before or after macro substitution]
>>
>>The Standard mandates the order of things happening in "2.1 Phases of
>>translation" which states that the source file is decomposed into
>>preprocessing tokens, then directives are executed and macros are
>>expanded. No tranlsation happens between decomposing into tokens (step
>>3) and substituting macros (step 4). All translation happens _after_
>>the processing steps 1 through 6 are done.
> OK - wish I had the standard to clarify as I don't quite understand
> your response. The three items you state don't (seemingly) deal with
> integer literas but "preprocessing tokens, then directives are
> executed
> and macros are expanded". In this case are we talking the mathematical
> work on integer literals are tokens or translations?
Mathematical computation is clearly not part of the tokenization
process, as tokenization means breaking a text into smaller tokens that
will be processed one at a time. The tokenizer doesn't know anything
about the semantics of the language constructs. Concerning your original
question I have to say that mathematical computations on literals are
performed _after_ the expansion of macros, thus it is non-conforming if
preprocessors do anything else but macro expansion or sources including.
>>
>>V
>>--
>>Please remove capital 'A's when replying by e-mail
>>I do not respond to top-posted replies, please don't ask
Had you not top-posted your reply, you may had got an answer from Victor
(who has certainly better knowledge of these issues than I).
Regards,
Stuart