From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37956 invoked by alias); 7 Sep 2018 15:20:12 -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 37412 invoked by uid 89); 7 Sep 2018 15:20:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Sep 2018 15:20:10 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5529F807689C for ; Fri, 7 Sep 2018 15:20:09 +0000 (UTC) Received: from redhat.com (ovpn-121-46.rdu2.redhat.com [10.10.121.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1563C63F2B; Fri, 7 Sep 2018 15:20:09 +0000 (UTC) Date: Fri, 07 Sep 2018 15:20:00 -0000 From: Marek Polacek To: Jason Merrill Cc: GCC Patches Subject: Re: C++ PATCH for c++/57891, narrowing conversions in non-type template arguments Message-ID: <20180907152007.GV12638@redhat.com> References: <20180723204912.GH29486@redhat.com> <20180809205940.GJ4317@redhat.com> <20180811141350.GL4317@redhat.com> <20180813222438.GR4317@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2018-09/txt/msg00437.txt.bz2 On Fri, Sep 07, 2018 at 01:40:53PM +0100, Jason Merrill wrote: > > 2018-08-13 Marek Polacek > > > > PR c++/57891 > > * call.c (struct conversion): Add check_narrowing_const_only. > > (build_converted_constant_expr): Set check_narrowing and > > check_narrowing_const_only. Give error if expr is error node. > > (convert_like_real): Pass it to check_narrowing. > > * cp-tree.h (check_narrowing): Add a default parameter. > > * decl.c (compute_array_index_type): Use input_location instead of > > location_of. > > * pt.c (convert_nontype_argument): Return NULL_TREE if tf_error. > > * typeck2.c (check_narrowing): Don't warn for instantiation-dependent > > expressions. Call maybe_constant_value instead of > > fold_non_dependent_expr. Don't mention { } in diagnostic. Only check > > narrowing for constants if CONST_ONLY. > > This seems to have broken cpp1z/direct-enum-init1.C with -std=c++17 > and above; please use make check-c++-all (or set > GXX_TESTSUITE_STDS=98,11,14,17,2a) to test C++ patches in all > conformance modes. Sorry about that, I've updated my testing and will fix it shortly. Marek