From patchwork Fri Mar 7 19:57:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 328065 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 78F342C00AD for ; Sat, 8 Mar 2014 06:57:44 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=CEvntG4yYidV6fRRTQymICzui3rjjHVrXrOuw6QuLL3Du8 wHlNP+jivJlyuY+bAZv3PqWhMRGMYB7Fq8zyVo8GbUaadxYWwV4A6GqFfRlFbpzv L5wgQOx3Qm4+YNAgYURtw3vOeUfkjsiUAI4dqkf1Xbuu/mllqIk32HyHohSlA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=hdpCOqLUqWqM8BuU4EHMyiEl9BU=; b=FcYL3lKJ2e1cWGnxojPq 8awKuFKPFwRSH2uauf6rgk+0a+eXUpUwaSOfuwmHq6NDGaSximeNZP3lpRgLbEQy kk/sQUHQnMm9kn9rHE1i6f00s26iaCPRw8STpyHSY6y65iTTMwkOwPzxNxhx3mdN 4cf2YPDV4wCh+t/ixDRPbro= Received: (qmail 2969 invoked by alias); 7 Mar 2014 19:57:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 2915 invoked by uid 89); 7 Mar 2014 19:57:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 ESMTP; Fri, 07 Mar 2014 19:57:30 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s27JvSPR007602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 7 Mar 2014 14:57:28 -0500 Received: from [10.10.116.21] ([10.10.116.21]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s27JvR4f015178 for ; Fri, 7 Mar 2014 14:57:28 -0500 Message-ID: <531A24A7.6020903@redhat.com> Date: Fri, 07 Mar 2014 14:57:27 -0500 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: gcc-patches List Subject: C++ PATCHes for C++14 testsuite regressions These patches address regressions revealed by my work to run the testsuite in C++14 mode. The first patch addresses multiple failures caused by force_paren_expr wrapping simple expressions so that decltype(auto) will treat them differently. The static_cast to reference trick was breaking bitfields, so I've switched to setting a flag on the COMPONENT_REF instead. And then I stopped doing the wrapping in unevaluated context to address problems with addressof. The second patch fixes an ICE on auto11.C due to confusion between 'auto' and 'T'. The third patch fixes many missed errors in auto9.C. The fourth patch harmonizes the default VLA warning level in C++14 mode with C++98/11: now we mostly won't get warnings about VLAs with -std=gnu++1y, but we will with -std=c++1y or with -Wvla. It also fixes the text of a pedwarn in build_new to be more helpful. The last patch applies to C++11 mode as well; running vt-34051 with -pedantic-errors was producing a spurious extra semicolon pedwarn. Tested x86_64-pc-linux-gnu, applying to trunk. commit fdf7f71e757340ea3eca836b5fa42e4faee36e13 Author: Jason Merrill Date: Fri Mar 7 09:55:58 2014 -0500 * parser.c (cp_parser_using_declaration): Consume the semicolon after bare parameter pack error. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 8bc1126..71a2a9e 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -16016,7 +16016,10 @@ cp_parser_using_declaration (cp_parser* parser, USING_DECL_TYPENAME_P (decl) = 1; if (check_for_bare_parameter_packs (decl)) - return false; + { + cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON); + return false; + } else /* Add it to the list of members in this class. */ finish_member_declaration (decl); @@ -16031,7 +16034,10 @@ cp_parser_using_declaration (cp_parser* parser, decl, NLE_NULL, token->location); else if (check_for_bare_parameter_packs (decl)) - return false; + { + cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON); + return false; + } else if (!at_namespace_scope_p ()) do_local_using_decl (decl, qscope, identifier); else