[Tooling] Tooling experience? (was Re: Proposed mission)

Tom Honermann tom at honermann.net
Mon Apr 9 16:32:29 CEST 2018


On 04/09/2018 09:09 AM, Boris Kolpackov wrote:
> Jens Maurer <Jens.Maurer at gmx.net> writes:
>
>> The current proposal to support macros in modules does not allow the
>> contents of a later import be influenced by macros defined by a former
>> import.
> You mean the module interface is immutable to macros defined in the
> importing translation unit? Yes, allowing this would be pure lunacy.
>
>
>> It's just that modules can make macros available to importing
>> translation units, and will be visible there.
> The following will still be possible, right?
>
> #import foo  // Exports macro FOO.
>
> #ifdef FOO
> #  import bar
> #endif
>
> Or even this:
>
> #import FOO
>
> This will require the back-and-forth between the build system and the
> compiler I mentioned earlier.

No, that would not be possible.  The "Another take on Modules" proposal 
[1] explicitly guards against this; see section 3.3 (Preprocessor impact).

Tom.

[1]: http://wg21.link/p0947


More information about the Tooling mailing list