From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46179 invoked by alias); 27 Jan 2016 21:08:22 -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 46161 invoked by uid 89); 27 Jan 2016 21:08:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=risk, vla X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 27 Jan 2016 21:08:20 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 5F11FC0A9CF3; Wed, 27 Jan 2016 21:08:19 +0000 (UTC) Received: from [10.10.116.23] (ovpn-116-23.rdu2.redhat.com [10.10.116.23]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0RL8Iu9013501; Wed, 27 Jan 2016 16:08:18 -0500 Subject: Re: C++ PATCH for c++/69496 (ICE on VLA in constexpr function) To: Martin Sebor , Marek Polacek References: <20160126230246.GO25528@redhat.com> <56A8404E.9030005@gmail.com> <20160127111954.GQ25528@redhat.com> <56A8F5BD.4010104@gmail.com> Cc: GCC Patches From: Jason Merrill Message-ID: <56A931C2.7020602@redhat.com> Date: Wed, 27 Jan 2016 21:08:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <56A8F5BD.4010104@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg02167.txt.bz2 On 01/27/2016 11:52 AM, Martin Sebor wrote: > I agree that there is some risk that it might break some working > programs. I would expect the most common use of initialized VLAs > be to set all elements to zero using the "= { }" or "= { 0 }" > syntax. Initializers with more elements are, IMO, likely to be > a bug where the user doesn't realize they defined a VLA rather > than an ordinary array. Since VLAs are required to have at least > 1 element, would diagnosing initializers with more than one element > more loudly (such as by default or with -Wall as opposed to with > -Wpedantic) be a good solution? That makes sense to me. Jason