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 760703870877 for ; Thu, 27 May 2021 17:39:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 760703870877 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-102-xofHgIVxMeCKxv1g-A55LA-1; Thu, 27 May 2021 13:39:50 -0400 X-MC-Unique: xofHgIVxMeCKxv1g-A55LA-1 Received: by mail-qt1-f199.google.com with SMTP id z9-20020a05622a0609b02901f30a4fcf9bso615410qta.4 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=fokSZqiOfIikpKD8CFBzQrBD44L1UnPbDdXJCs8CwzLBEJr1U+p+/xTZHIYHnEd2uh Ion/Tt5VXiYvwWx+MpbChmO7t7rvAD2xqbcjD6FrSK4ysbD3SEThuD1vt/zrxZeIc4nX Xh8E3dc79bSYnq6MzZp1DOEwUTKDzcn40ABsSQz/a2dRFjYuwulZyj76jc8/uSDyzSQk p1gZPr+qYsDv2Dccp/VspWcf4K7RpbHAfW/oD+8OWh70QWRmeM1xTXLZBPgo5POkMP7C VBx+Ojqgkioj23236koYJ8q7zBWwV5KAI07X001AruByKh65hgZ/y9yttZZcz5dfboCW mEaA== X-Gm-Message-State: AOAM533I8YOdnjKrRJBzSgDa7sB0HBb42tRkf5jvGFWCbTLi+H1/Wuy8 C3EEIKc+LPEvDLyWelNot/VuD5+ik3ZRsd7mn7gqFds5Z464aP2ISX/P3/8wAC9lE5jrCAwkXQB cCQCPFeL1p1WZs5ePng== X-Received: by 2002:ac8:6f0d:: with SMTP id g13mr4171803qtv.319.1622137190030; 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=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2021 17:39:55 -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