From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by sourceware.org (Postfix) with ESMTPS id 7D9C63834699 for ; Thu, 21 Apr 2022 12:05:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D9C63834699 Received: by mail-qk1-x72e.google.com with SMTP id d198so3334089qkc.12 for ; Thu, 21 Apr 2022 05:05:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=C3G3zvXMq9nx6AwASpNYPkJ3zclQln9WRfIdC+5L4FY=; b=StsMjIyQ/2921AmjvSG445FlhpyTSWDvGsOy9868rcQ3IZyBAurnOIHRmAfeqFf9YN b7NHo8wLew+4JrnZk3pQv+qY3gcUJt5S34dm+OG/u6ECn7iioa8q4JlZhAlT1dgdjw5/ 9lRUiDDMqYsGgkrLJw69r86xFV2mYYPbe20M2P1PVpUt2pO3oKMyDXdI+m6yorNomzUO A7mI4wgNB17IYTCux3hlxTXxrUrL4i2Z4PhmAOMV0sqcxD3mPRku/Ue6FtQlv+NwykIL b0dUk1U+qIc48SE3UM3FHJLovjAx+0pvTt6toogYQYP1/PhvVfZ2xL+anfLm3jzT3671 9Wjw== X-Gm-Message-State: AOAM531LHt7egmRfkE4K1xMktIFm1mU2XqjALyEuy7gXEaalzWjIGWog 7aKQXPkV0xBcmNmrQaMkcDFvJ29YQg5nvYjS X-Google-Smtp-Source: ABdhPJw3y52l8G6vyPQKwxvtcm68jVMR7odSGYxApFjsoLhZgFxGXwFZq/wBmtz5rrEizm3YWOZ+vg== X-Received: by 2002:a05:620a:408e:b0:69e:d439:c7a0 with SMTP id f14-20020a05620a408e00b0069ed439c7a0mr4630556qko.641.1650542735782; Thu, 21 Apr 2022 05:05:35 -0700 (PDT) Received: from localhost (cpe-142-105-146-128.nycap.res.rr.com. [142.105.146.128]) by smtp.gmail.com with ESMTPSA id i68-20020a375447000000b006809e0adfffsm2883405qkb.25.2022.04.21.05.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 05:05:34 -0700 (PDT) Date: Thu, 21 Apr 2022 08:05:33 -0400 From: Ben Boeckel To: Boris Kolpackov Cc: gcc@gcc.gnu.org Subject: Re: [modules] Preprocessing requires compiled header unit modules Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.1.5 (2021-12-30) X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2022 12:05:40 -0000 On Thu, Apr 21, 2022 at 06:05:52 +0200, Boris Kolpackov wrote: > I don't think it is. A header unit (unlike a named module) may export > macros which could affect further dependencies. Consider: > > import "header-unit.hpp"; // May or may not export macro FOO. > > #ifdef FOO > import "header-unit2.hpp" > #endif I agree that the header needs to be *found*, but scanning cannot require a pre-existing BMI for that header. A new mode likely needs to be laid down to get the information necessary (instead of just piggy-backing on `-E` behavior to get what I want). --Ben