From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 144DD3858289 for ; Mon, 10 Oct 2022 20:21:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 144DD3858289 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665433299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L+ftseJ4uwOtIywBlWfImubpoT1elVh/UJot9ZdZqS4=; b=U9K5mHEG2+WEDg6EcVLlPFakdCK13I6iVJkGdclcB9Klr8emUUqsmLezP9QHrMWso+WeK7 7M5aU9ervuypNmnoEYOshGFC+uESfMdRql/d4lMwwkoxQ+7xkWP9s8ulV3FpWmQ01H/SKP 7ZWBeI4ZgcZ+UOJRjfh1CL9YLZ4QzYU= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-433-og6P9lAdMN6qR_Ov2USEYQ-1; Mon, 10 Oct 2022 16:21:39 -0400 X-MC-Unique: og6P9lAdMN6qR_Ov2USEYQ-1 Received: by mail-qv1-f71.google.com with SMTP id h3-20020a0ceec3000000b004b17a25f8bcso6910738qvs.23 for ; Mon, 10 Oct 2022 13:21:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=L+ftseJ4uwOtIywBlWfImubpoT1elVh/UJot9ZdZqS4=; b=nWN+GGfoS0UPUS2Fa0vMEwWq/23fwN4l39J9+GyLDULxUHqXY8hQVc5HpZbt1Uc2uX g0UDSNhc1vC8i0ZXZJ7wuFLln5ubG0BtHeZNgbDX/ll0/R1HgZbYFT0cflH1eG2zy3+Z f6g2GsPEljp8rt07ZQlh3j9GV6wV/spfzrpdLye4J9VU2w2VMSC+Zt1t7RmKs8Yd9twM ydoclinmRte1xxMAzetcy1/J/hEPJD0rtUKVC6HOTLkM3IpD49S8seskQPnQY3UHRiR2 wO9Fer4ZHazi4wcEQc6w8hospt7GBM1gEFfOoU00SSRumwpBMKLNXrdkqzA7tYsku/0/ VsGA== X-Gm-Message-State: ACrzQf2BJnYKCjPOM7uwK/ZRLuZz8GetrLs74C+ApAdZvuDG5JNTwTRx 7p0H7lc876Q/2gtBt6WLZVYhPjKnG3SdNSVO327cQfQLUNJWO92a147UN1EukkEILOGitUXA5Bt 2UMv1kBMMgWLlXJk2xw== X-Received: by 2002:ac8:5914:0:b0:35b:b041:3a09 with SMTP id 20-20020ac85914000000b0035bb0413a09mr16797163qty.354.1665433294633; Mon, 10 Oct 2022 13:21:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6BDuOTdBf+TvLBEyOH2PVq+bXF4h+4EoD+6tUE128+4t+M6wACl8QV3RBTBbDMqgR2nWLivw== X-Received: by 2002:ac8:5914:0:b0:35b:b041:3a09 with SMTP id 20-20020ac85914000000b0035bb0413a09mr16797143qty.354.1665433294337; Mon, 10 Oct 2022 13:21:34 -0700 (PDT) Received: from [192.168.1.101] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id j10-20020ac806ca000000b00359961365f1sm8919204qth.68.2022.10.10.13.21.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Oct 2022 13:21:32 -0700 (PDT) Message-ID: <3bfbf143-d85e-cb93-68eb-686262e2acc3@redhat.com> Date: Mon, 10 Oct 2022 16:21:30 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH RESEND 0/1] RFC: P1689R5 support To: Ben Boeckel , gcc-patches@gcc.gnu.org Cc: nathan@acm.org, fortran@gcc.gnu.org, gcc@gcc.gnu.org, brad.king@kitware.com, Ben Boeckel , David Malcolm References: <20221004151200.1275636-1-ben.boeckel@kitware.com> From: Jason Merrill In-Reply-To: <20221004151200.1275636-1-ben.boeckel@kitware.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/4/22 11:11, Ben Boeckel wrote: > This patch adds initial support for ISO C++'s [P1689R5][], a format for > describing C++ module requirements and provisions based on the source > code. This is required because compiling C++ with modules is not > embarrassingly parallel and need to be ordered to ensure that `import > some_module;` can be satisfied in time by making sure that the TU with > `export import some_module;` is compiled first. > > [P1689R5]: https://isocpp.org/files/papers/P1689R5.html > > I'd like feedback on the approach taken here with respect to the > user-visible flags. I'll also note that header units are not supported > at this time because the current `-E` behavior with respect to `import > ;` is to search for an appropriate `.gcm` file which is not > something such a "scan" can support. A new mode will likely need to be > created (e.g., replacing `-E` with `-fc++-module-scanning` or something) > where headers are looked up "normally" and processed only as much as > scanning requires. > > Testing is currently happening in CMake's CI using a prior revision of > this patch (the differences are basically the changelog, some style, and > `trtbd` instead of `p1689r5` as the format name). > > For testing within GCC, I'll work on the following: > > - scanning non-module source > - scanning module-importing source (`import X;`) > - scanning module-exporting source (`export module X;`) > - scanning module implementation unit (`module X;`) > - flag combinations? > > Are there existing tools for handling JSON output for testing purposes? David Malcolm would probably know best about JSON wrangling. > Basically, something that I can add to the test suite that doesn't care > about whitespace, but checks the structure (with sensible replacements > for absolute paths where relevant)? Various tests in g++.dg/debug/dwarf2 handle that sort of thing with regexps. > For the record, Clang has patches with similar flags and behavior by > Chuanqi Xu here: > > https://reviews.llvm.org/D134269 > > with the same flags (though using my old `trtbd` spelling for the > format name). > > Thanks, > > --Ben > > Ben Boeckel (1): > p1689r5: initial support > > gcc/ChangeLog | 9 ++ > gcc/c-family/ChangeLog | 6 + > gcc/c-family/c-opts.cc | 40 ++++++- > gcc/c-family/c.opt | 12 ++ > gcc/cp/ChangeLog | 5 + > gcc/cp/module.cc | 3 +- > gcc/doc/invoke.texi | 15 +++ > gcc/fortran/ChangeLog | 5 + > gcc/fortran/cpp.cc | 4 +- > gcc/genmatch.cc | 2 +- > gcc/input.cc | 4 +- > libcpp/ChangeLog | 11 ++ > libcpp/include/cpplib.h | 12 +- > libcpp/include/mkdeps.h | 17 ++- > libcpp/init.cc | 14 ++- > libcpp/mkdeps.cc | 235 ++++++++++++++++++++++++++++++++++++++-- > 16 files changed, 368 insertions(+), 26 deletions(-) > > > base-commit: d812e8cb2a920fd75768e16ca8ded59ad93c172f