From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 495DC3858D37 for ; Thu, 21 Apr 2022 17:59:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 495DC3858D37 Received: by mail-wr1-x430.google.com with SMTP id bv16so7732645wrb.9 for ; Thu, 21 Apr 2022 10:59:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Q6wiIULXp2OYBY7U1fGJDoQl6Fx9stdRXTDPFg3zKYU=; b=7e5FXr5fGmus7+P1stqPO7UtDCBtvJOZnIdYPejJ6GJiI3ZDJxii2iQ+Ds1VkPd+Rl Z1C0PIrmR66D+g45Nv324tkLAbTkVLiv7/Eq004S5r6d13oH+zqM3yRRAo9QWXf/55EN gCr2j4xrFO4tb7SZzx53pbtI9eqFyzNT+ic9IOX6azYEPc4+x3y15cFzdckgUcBw4nu1 YFRpwjTb0dEmEomh5AtBC7QLZrCpzsFihriQXzgJ59cu2vh/MMFMrjzI3I0OLgS+wtC0 9YXzOzxjxJHcz3XlPeDj7N8G+HVxtyi0MEPQuSoQrtAEIfEHK93D1iw1DEl6bYXcZt6h uuHw== X-Gm-Message-State: AOAM530cKNhj1cOLIW/EJCzmdBcKXr1H9ChFkM4uNTiXDYNU4v4bH6is 0eKb801O4ZfojxM4ZVboZcI= X-Google-Smtp-Source: ABdhPJzUsiMozJBDgmZJCYi+dzoYFhbZHupbYhqRGCliHe98dZuj6Jx7dJjG7eZ+38kiOG+mrD50Iw== X-Received: by 2002:a05:6000:1a8a:b0:20a:af19:ad12 with SMTP id f10-20020a0560001a8a00b0020aaf19ad12mr698042wry.4.1650563997914; Thu, 21 Apr 2022 10:59:57 -0700 (PDT) Received: from [192.168.1.214] (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.googlemail.com with ESMTPSA id f16-20020a05600c155000b0039288e17458sm3038649wmg.19.2022.04.21.10.59.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Apr 2022 10:59:57 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [modules] Preprocessing requires compiled header unit modules From: Iain Sandoe In-Reply-To: Date: Thu, 21 Apr 2022 18:59:56 +0100 Cc: Boris Kolpackov , gcc@gcc.gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Ben Boeckel X-Mailer: Apple Mail (2.3445.104.21) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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 18:00:01 -0000 Hi Ben, > On 21 Apr 2022, at 13:05, Ben Boeckel via Gcc wrote: >=20 > 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: >>=20 >> import "header-unit.hpp"; // May or may not export macro FOO. 1. If you know how this was built, then you could do an -E = -fdirectives-only build (both GCC and clang support this now) to obtain the macros. 2. I suppose we could invent a tool (or FE mode) to dump the macros = exported by a HU *** >> #ifdef FOO >> import "header-unit2.hpp" >> #endif >=20 > 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). perhaps that means (2)? Iain *** it=E2=80=99s kinda frustrating that this is hard infomation to get = as a developer, so perhaps we can anticipate users wanting such output.