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 BCC0E3858D37 for ; Mon, 10 Oct 2022 20:21:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BCC0E3858D37 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=1665433298; 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=XMUsgpbA/ykOCamtNWlxPAAuz8KrWrnKwRHbZoV2Rf0/+S1DGtYVsQuIwQVga/DM+ElR+f wZCR9Hgmix3YMEqmeMhJszCHeGqALmc7xvsBz5FgDWZ++z/ldfcZ1vB++QQ6jlHDVbelmX A8AI8oWe9V+/XBYr/+Vgyyj3GvnCl6c= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-637-BkoJirmQMdOOhU2mvPSBAA-1; Mon, 10 Oct 2022 16:21:37 -0400 X-MC-Unique: BkoJirmQMdOOhU2mvPSBAA-1 Received: by mail-qk1-f197.google.com with SMTP id n13-20020a05620a294d00b006cf933c40feso10150116qkp.20 for ; Mon, 10 Oct 2022 13:21:37 -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=IJJ48Kqeqh7Zs+FcGhFFD+5onGJ4uFruAmDnnMEqphd7NUkz4Vz2pT+acyPxk05ign 9MY37GF8SSSHjjDDeg/mzJw+SkOoP312rFctYd2tuIeQsihKjY8ilHb2xS27B7N7XxVc aR5xhEYKAOy2D1qJstdhG+Jee2ow8dqQEQDk1Zi0ZDiEyWx4L2PpAxqUveJYu5sx64s4 0H6kA1vOv1NBFlM2DFkmqhaEDpPBjvh6He54QIVdgu3AHCLRZ1hzkCcUCbEpAwGtRtYV I6kU+emtJV/4L/PAWG8aeu/lYULKg1RTvYyweTo0LxyKTyBzoM6cK+zeGcFYuqqM+DmK W6tg== X-Gm-Message-State: ACrzQf2NKztSrgMzvPNvlSDx7PeG/c29wNQoukiW4aVpH+/9FZIR/1oj Tk3POFDLXbnGZ+fE4IbGuKOKkrlka7nSkyvqzsm1CNBTKOybWBANhWO4n7zJok1WlRFuGzha8s4 c9sSnX6U= X-Received: by 2002:ac8:5914:0:b0:35b:b041:3a09 with SMTP id 20-20020ac85914000000b0035bb0413a09mr16797162qty.354.1665433294635; 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=ham 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