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.133.124]) by sourceware.org (Postfix) with ESMTP id 757E53857831 for ; Thu, 27 May 2021 17:39:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 757E53857831 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-148-CEujpbnvPTeJHkI8blgMNw-1; Thu, 27 May 2021 13:39:50 -0400 X-MC-Unique: CEujpbnvPTeJHkI8blgMNw-1 Received: by mail-qv1-f69.google.com with SMTP id 6-20020a05621420a6b0290214b9d4b6c3so675143qvd.11 for ; Thu, 27 May 2021 10:39:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=V9OGm52kW1/Ox1TFEdvPBMV/Qw7rL7IxM3zZ4qEAMNU=; b=dGoF2T5crPLm2mLdg9erAAewl+glEezunJ56sstznoLUDy4crnw7ZayWWM3lyYYKLd bsmlhN+aFqrsjJdr8UWG/Sjn9FDZjzJsjFYelXb27sy8qpA8q41kBJj8Yparxv1/Lnd0 7t24QKunUMAp9zp8ztkhy0uqzUPVK3PrCvNQcjTkSX6ZLZd97ZpVBxO6hPEm2U1FtpS8 rNOsvO6QtmB02/OxeXCLeiaTnJbjYnfqDRfZUM8PVQbhHncPtRTxFdOv1b3QZpdm/U0W DREVfO31GZQit9O/QIjUV5VFvtJHzPn0ztq0INOYkBqfQTLB3I5qbqWqf23hx9Riy9O6 8LFQ== X-Gm-Message-State: AOAM533k0Q1z6ZMpBPlOBtYfRcJx6fiVL0E9JU6B3FL65/fWI/UsY9Lv jXRZt8PGRYaJZYzvYVkd6hn8tsNPnIe1Ur2XMSsTvleRmEjpLBaaYfeJrQJ44NQQtfFygRWpHQt UB1ZRrs2cEPxSLh1NJpn9yH5SoIz+LpxOHp3d96zUVrj/xGcqKWImmlqaqNKAbKA= X-Received: by 2002:ac8:6f0d:: with SMTP id g13mr4171810qtv.319.1622137190090; Thu, 27 May 2021 10:39:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4q8Kf0Tq9PPsZdgRp12i4yiAC/ELdCTUE+myQShZPSEAwjnThAkY49sw97wBh2anzP4se0Q== X-Received: by 2002:ac8:6f0d:: with SMTP id g13mr4171782qtv.319.1622137189737; Thu, 27 May 2021 10:39:49 -0700 (PDT) Received: from [192.168.1.148] ([130.44.159.43]) by smtp.gmail.com with ESMTPSA id l65sm1816119qke.7.2021.05.27.10.39.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 May 2021 10:39:49 -0700 (PDT) Subject: Re: [PATCH] Add gnu::diagnose_as attribute To: Matthias Kretz , gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org References: <14205410.xuKvIAzr1H@excalibur> <20210427094648.GL3008@redhat.com> <91863212.B8guWdUDZo@excalibur> From: Jason Merrill Message-ID: <05673834-4912-e418-43cc-2dfdd45aabdf@redhat.com> Date: Thu, 27 May 2021 13:39:48 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <91863212.B8guWdUDZo@excalibur> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.4 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_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2021 17:39:53 -0000 On 5/4/21 7:13 AM, Matthias Kretz wrote: > From: Matthias Kretz > > This attribute overrides the diagnostics output string for the entity it > appertains to. The motivation is to improve QoI for library TS > implementations, where diagnostics have a very bad signal-to-noise ratio > due to the long namespaces involved. > On Tuesday, 27 April 2021 11:46:48 CEST Jonathan Wakely wrote: >> I think it's a great idea and would like to use it for all the TS >> implementations where there is some inline namespace that the user >> doesn't care about. std::experimental::fundamentals_v1:: would be much >> better as just std::experimental::, or something like std::[LFTS]::. Hmm, how much of the benefit could we get from a flag (probably on by default) to skip inline namespaces in diagnostics? > With the attribute, it is possible to solve PR89370 and make > std::__cxx11::basic_string<_CharT, _Traits, _Alloc> appear as > std::string in diagnostic output without extra hacks to recognize the > type. That sounds wrong to me; std::string is the instantiation, not the template. Your patch doesn't make it possible to apply this attribute to class template instantiations, does it? Jason