Subject: Re: Header unit importation syntax
From: Maris Razvan (razvyboy2004_at_[hidden])
Date: 2019-08-24 00:36:41
Thank you for your answer.
I read more about the import directive and I came to the following
conclusion: a line containing "import pp-tokens;" is a preprocessing
directive (as stated in eel.is/c++draft/cpp#1) and it should be first
processed by the preprocessor (in case it matches the first two
production rules of the pp-import non-terminal macro definitions
should be imported). Next, the same line should be then translated
(processed by the compiler), even if it matches the first two
production rules or the third one, correct? However, being a
preprocessing directive, it is deleted at the end of translation phase
4. Therefore it cannot be seen by the compiler, right?
On Sat, Aug 24, 2019 at 12:43 AM Michael Spencer <bigcheesegs_at_[hidden]> wrote:
> On Fri, Aug 23, 2019 at 2:13 PM Maris Razvan via Std-Discussion <std-discussion_at_[hidden]> wrote:
>> In the current C++ draft (august 2019), the grammar for a pp-import
>> (http://eel.is/c++draft/cpp.import#nt:pp-import) allows for additional
>> pp-tokens after the header-name or the header-name-tokens.
>> The current version of that section is the result of P1703:
>> "Recognizing Header Unit Imports Requires Full Preprocessing"
>> Before the changes caused by this proposal, the grammar still allowed
>> for preprocessing tokens tokens after the header-name or the
>> header-name-tokens, but in the form of a pp-import-suffix. (section
>> [cpp.module] of P1103
>> What is the reasoning behind allowing additional, unused preprocessing
>> tokens in this context?
>> Thank you.
>> Std-Discussion mailing list
> The reason is to allow attributes.
> - Michael Spencer
STD-DISCUSSION list run by email@example.com
Older Archives on Google Groups