Date: Sun, 18 Dec 2022 11:02:02 +0100
On 18/12/2022 04.19, Gabriel Dos Reis wrote:
> [Jens]
>> This clearly refers to "translation units", and translation units are a phase 7 concept per [lex.phases] p7:
>> "Whitespace characters separating tokens are no longer significant. Each preprocessing token is converted
>> into a token (5.6). The resulting tokens are syntactically and semantically analyzed and translated as a
>> translation unit."
>
> In that case, what is the difference between "translation units" and "translated translation units"?
A "translation unit" is a sequence of tokens that are (only) lexically valid.
Looking at phase 8 (template instantiation), a "translated translation unit" is some
unspecified intermediate thing where all non-dependent constructs have been semantically
analyzed, but no templates have been instantiated yet. Maybe such a thing doesn't exist
in your implementation.
Jens
> [Jens]
>> This clearly refers to "translation units", and translation units are a phase 7 concept per [lex.phases] p7:
>> "Whitespace characters separating tokens are no longer significant. Each preprocessing token is converted
>> into a token (5.6). The resulting tokens are syntactically and semantically analyzed and translated as a
>> translation unit."
>
> In that case, what is the difference between "translation units" and "translated translation units"?
A "translation unit" is a sequence of tokens that are (only) lexically valid.
Looking at phase 8 (template instantiation), a "translated translation unit" is some
unspecified intermediate thing where all non-dependent constructs have been semantically
analyzed, but no templates have been instantiated yet. Maybe such a thing doesn't exist
in your implementation.
Jens
Received on 2022-12-18 10:02:09