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 865133857B88 for ; Thu, 15 Feb 2024 21:21:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 865133857B88 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 865133857B88 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708032092; cv=none; b=arkjuTNaZheR+2GuhjtEmThrMcobT8tzSFq40h88Cgsfnz0zFLv9S0eR+uhBlI/fXxybRy91BykCeUYgfGK3eDBcBXm7g0hU8875CmXB949GumVUeBC+wE/C3yMYbc/nDTyxKoiW0tsnP8qWZaGNWYw6R+Ik36wDnW+i8Ji+N0Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708032092; c=relaxed/simple; bh=QQZYdPek7pXY5HVWnz9JWhP3kRHbNpGI3Cu2ArqHbQY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=NRpWpx1YMVGzUmxylGKLnerm7KIpNSBEu1HUz2W1PDNrcGSNjR10twu4XIutLg7ja+alZISiqQvUzHUNDLvcQrWygD9qXJIjWpicJq5DQ40hrrnjUwjdejOUhpfVzQio1Yi8Z0di0MdZUIJ7XorSPgruLjq4szoQmF65tsG9gr0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708032088; 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=0zc1UJZdKeDI5SQ9i9rx3j4SeppG2HDkxOkbU4cz+/s=; b=DJlZeB0h1kE6YQRLiqPavZnlO4gh4ucr87+to0Wv1ALCOaD4nXUeFp5hkOq3JfeBYdTknC 39pS1GjSSBi1e7gFn485fJVuHFs1vdfJ2iHbt9mXkJ4XHQcPInDFetlT1JQ6t0TfYzQMyc d37KW3heo278D+pOy4EA7744K4uxp0s= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-119-0ZY9CCgVNbSXSSLnhIlzMA-1; Thu, 15 Feb 2024 16:21:27 -0500 X-MC-Unique: 0ZY9CCgVNbSXSSLnhIlzMA-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-68c4f4411f8so30416216d6.0 for ; Thu, 15 Feb 2024 13:21:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708032086; x=1708636886; 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=0zc1UJZdKeDI5SQ9i9rx3j4SeppG2HDkxOkbU4cz+/s=; b=B7cQmg4RyAbIkoj4Lv+A9/TrU5KXwonaFFFzMhzuVaPdekbJRIZsfQC8Ryb6A8W3jO 4lK8YwPciqFs+LFaSp5AilXWZoaIQPI1RK+8STAPHSqYuqbkJFZ2Ll3I8WSGH+zckt0Y C8cZdixYm2/x6yV78tvBYnVUB4YXtkfz4DwJqtNpe4cysfYmy59QtFTMNNO4Arv6F4/i FiKyTjP3hEgimZokh8hRuGsZ4b9HkqSPy4QAuoamNiYHbd4WOxdV4bO+pgVTP+Vhcpo2 kPa9iHOehc3iXcEE42iQmHUA1v7FuyXfQNzGpe/bTpOGs9zNB5Ziuxpj2Vwm/AjGDXoc Yclg== X-Forwarded-Encrypted: i=1; AJvYcCXfF26Fx959aCRM+0wQyN52henLMQQAxW3ZdLbJOD9gN5mpowpMtjB/4IVXYxXsG89n2KikbzQvpxRGnIZ8BUdRwETKHuly0g== X-Gm-Message-State: AOJu0YyKupcP9Tm0i6kKnHxAiqVQ94lme6JqJ2pm0y448f3DJqhEgr3e 4EbhKxBWiw3hqFFsGx0yJ4DnemyKedixG2XIyIOAr476ATapUENgKgJhKw2tQnekO6PpPmxcZ4V n94opfS1R7ZQGiV3GmE3LCvVJl0hnHG3Mph2DXLCspK6HvZr94+PjOXo= X-Received: by 2002:a0c:b4d2:0:b0:68f:2eab:ad86 with SMTP id h18-20020a0cb4d2000000b0068f2eabad86mr1324593qvf.5.1708032086609; Thu, 15 Feb 2024 13:21:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtEPt22vzpf75PWcy6dVf10fop6QrrNmBicP23v2YSCpSaA1CSBxxmh/BuNLv0ofN/DAI+5A== X-Received: by 2002:a0c:b4d2:0:b0:68f:2eab:ad86 with SMTP id h18-20020a0cb4d2000000b0068f2eabad86mr1324570qvf.5.1708032086360; Thu, 15 Feb 2024 13:21:26 -0800 (PST) Received: from [192.168.1.130] (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id pd8-20020a056214490800b0068f2e1bd4cfsm286965qvb.0.2024.02.15.13.21.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Feb 2024 13:21:25 -0800 (PST) Message-ID: <57d9a71a-998a-4ff6-ac0f-d99846fbab47@redhat.com> Date: Thu, 15 Feb 2024 16:21:25 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] c++/modules: relax diagnostic about GMF contents To: Patrick Palka , gcc-patches@gcc.gnu.org Cc: nathan@acm.org References: <20240215211019.340428-1-ppalka@redhat.com> From: Jason Merrill In-Reply-To: <20240215211019.340428-1-ppalka@redhat.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=-12.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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 2/15/24 16:10, Patrick Palka wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > OK for trunk? > > -- >8 -- > > Issuing a hard error when the GMF doesn't contain preprocessing > directives is inconvenient for automated testcase reduction via cvise. > This patch relaxes this diagnostic into a pedwarn. > > gcc/cp/ChangeLog: > > * parser.cc (cp_parser_translation_unit): Relax GMF contents > error into a pedwarn. > > gcc/testsuite/ChangeLog: > > * g++.dg/modules/friend-6_a.C: Remove now unnecessary > preprocessing directives from GMF. > --- > gcc/cp/parser.cc | 6 +++--- > gcc/testsuite/g++.dg/modules/friend-6_a.C | 2 -- > 2 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc > index 9d0914435fb..e60f0425035 100644 > --- a/gcc/cp/parser.cc > +++ b/gcc/cp/parser.cc > @@ -5253,9 +5253,9 @@ cp_parser_translation_unit (cp_parser* parser) > if (!warned) > { > warned = true; > - error_at (token->location, > - "global module fragment contents must be" > - " from preprocessor inclusion"); > + pedwarn (token->location, OPT_Wpedantic, > + "global module fragment contents must be" > + " from preprocessor inclusion"); Relaxing to pedwarn is fine, but I think it should be on by default, not just with -pedantic. So it should get a new option. Jason