From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72212 invoked by alias); 15 Jun 2015 23:14:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 72203 invoked by uid 89); 15 Jun 2015 23:14:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: vms173001pub.verizon.net Received: from vms173001pub.verizon.net (HELO vms173001pub.verizon.net) (206.46.173.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 15 Jun 2015 23:14:47 +0000 Received: from [192.168.1.3] ([173.67.5.214]) by vms173001.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0NQ000564DW3OZ20@vms173001.mailsrvcs.net> for gcc-patches@gcc.gnu.org; Mon, 15 Jun 2015 18:14:27 -0500 (CDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=DcDq0aZW c=1 sm=1 tr=0 a=EgxZNPMZQWYqNIP3PIRi2A==:117 a=KOg_qkMfzZkA:10 a=N659UExz7-8A:10 a=o1OHuDzbAAAA:8 a=oR5dmqMzAAAA:8 a=hTZS6uLwhHpx5LOQAS/v3KalXBI=:19 a=-9mUelKeXuEA:10 a=XAFQembCKUMA:10 a=JEeFQQHs9bqzlO1YAf8A:9 a=pILNOxqGKmIA:10 Message-id: <557F5C53.2090009@verizon.net> Date: Tue, 16 Jun 2015 00:37:00 -0000 From: Ed Smith-Rowland <3dw4rd@verizon.net> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-version: 1.0 To: Jason Merrill , gcc-patches , Paolo Carlini Subject: Re: [C++17] Implement N3928 - Extending static_assert References: <55453092.5050501@verizon.net> <555CA818.7020301@redhat.com> <557EF7AF.4080009@redhat.com> In-reply-to: <557EF7AF.4080009@redhat.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit X-SW-Source: 2015-06/txt/msg01055.txt.bz2 On 06/15/2015 12:05 PM, Jason Merrill wrote: > On 05/20/2015 11:28 AM, Jason Merrill wrote: >> On 05/02/2015 04:16 PM, Ed Smith-Rowland wrote: >>> This extends' static assert to not require a message string. >>> I elected to make this work also for C++11 and C++14 and warn only with >>> -pedantic. >>> I think many people just write >>> static_assert(thing, ""); >>> . >>> >>> I took the path of building an empty string in the parser in this case. >>> I wasn't sure if setting message to NULL_TREE would cause sadness later >>> on or not. >> >> Hmm. Yes, this technically implements the feature, but my impression of >> the (non-normative) intent was that they wanted leaving out the string >> to print the argument expression, in about the same way as >> >> #define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) >> >> So the patch is OK as is, but you might also look into some libcpp magic >> to insert a second argument that stringizes the first. > > Are you planning to check this in? > > Jason > > > Jason, I wanted to fix it up as per your suggestion. If someone wants it now I can retest and commit. Otherwise give me a bit more time. Also, if you or someone else really has the whole enchilada then by all means just commit that. Ed