C++ Logo

sg15

Advanced search

Re: [isocpp-core] Named modules, macros, and re-exporting header units

From: Richard Smith <richardsmith_at_[hidden]>
Date: Fri, 16 Dec 2022 11:41:44 -0800
On Fri, Dec 16, 2022, 10:23 Ville Voutilainen via Core <
core_at_[hidden]> wrote:

> On Fri, 16 Dec 2022 at 20:21, Gabriel Dos Reis via SG15
> <sg15_at_[hidden]> wrote:
> > Exactly why we need to clarify the normative text to say explicitly that
> importing a named module does not bring in any macro even if the nominated
> module re-exported a header unit which might bring in macros if imported
> directly. Even if we believe there is a (long) chain of inference to
> arrive there, it is better to have an explicit normative text to that
> effect.
>
> Agreed, having an import of a named module bring in a macro is
> unhinged, and must be rectified via any means.
>

We already have explicit normative text that says the right thing, but
given that an implementer has read it and misunderstood, it seems like it's
not clear enough and that rules describing phase 7 of translation are being
incorrectly applied in phase 4 as well. We should probably reiterate that
the rules in the preprocessor section define the behaviour of phase 4 of
translation and the rules elsewhere do not, and what that means for macro
imports in particular. A couple of well-placed notes or examples seem
well-suited for this purpose to me.

_______________________________________________
> Core mailing list
> Core_at_[hidden]
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/core
> Link to this post: http://lists.isocpp.org/core/2022/12/13659.php
>

Received on 2022-12-16 19:41:56