From patchwork Fri Feb 19 15:51:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Edlinger X-Patchwork-Id: 585257 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 D9F4A140662 for ; Sat, 20 Feb 2016 02:51:24 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ZMzGCrn8; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:mime-version; q=dns; s=default; b=t8B8lULXm4NSlYDY x424bz8xkwwosZXkylXbrv5tVbpvqXyqrQGQvTy/O7u2MxyOxVcXDixoM4/hBNaw Ds+c7BzWBl0Nyari6MUBu36K1Ia/wiTDo98FORSwvkESsv0d8b8tAGKRC+HgiAyA AQ+BOZtcdRUxLw61uL7302uEmhE= 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:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:mime-version; s=default; bh=Jb7vJtQ4JDIcWgtnVapjRR A+eI4=; b=ZMzGCrn8TdjC3oM9o1nhgEK/LXYRbsvgEcoalr40C7UQb8vDWow8R9 ajy00Huru5Zq1UYbzorDHzvdCvNGJ4jaMohMfaDmod9b4IenxdVVO2ND5l+bg5rm 8pqnryZMViuts1QYn9OUsw3eJ2JJzNaE7hOiXoI2eyWOo3/FLsT1w= Received: (qmail 3531 invoked by alias); 19 Feb 2016 15:51:15 -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 3520 invoked by uid 89); 19 Feb 2016 15:51:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 spammy=4726, 47, 26, 233557, H*c:HHH X-HELO: DUB004-OMC4S3.hotmail.com Received: from dub004-omc4s3.hotmail.com (HELO DUB004-OMC4S3.hotmail.com) (157.55.2.78) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Fri, 19 Feb 2016 15:51:13 +0000 Received: from emea01-db3-obe.outbound.protection.outlook.com ([157.55.2.72]) by DUB004-OMC4S3.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Fri, 19 Feb 2016 07:51:10 -0800 Received: from HE1PR07MB0905.eurprd07.prod.outlook.com (10.162.26.12) by HE1PR07MB0908.eurprd07.prod.outlook.com (10.162.26.15) with Microsoft SMTP Server (TLS) id 15.1.409.15; Fri, 19 Feb 2016 15:51:08 +0000 Received: from HE1PR07MB0905.eurprd07.prod.outlook.com ([10.162.26.12]) by HE1PR07MB0905.eurprd07.prod.outlook.com ([10.162.26.12]) with mapi id 15.01.0409.017; Fri, 19 Feb 2016 15:51:08 +0000 From: Bernd Edlinger To: Jakub Jelinek CC: "gcc-patches@gcc.gnu.org" , Jason Merrill , Jonathan Wakely Subject: Re: [C++ PATCH] Fix option handling when -std=gnu++14 is not used (PR 69865) Date: Fri, 19 Feb 2016 15:51:08 +0000 Message-ID: References: <20160219105612.GA3017@tucnak.redhat.com> <20160219113126.GB3017@tucnak.redhat.com> <20160219115945.GC3017@tucnak.redhat.com> <20160219122212.GD3017@tucnak.redhat.com> <20160219122646.GE3017@tucnak.redhat.com> <20160219152243.GP3017@tucnak.redhat.com> In-Reply-To: <20160219152243.GP3017@tucnak.redhat.com> authentication-results: redhat.com; dkim=none (message not signed) header.d=none; redhat.com; dmarc=none action=none header.from=hotmail.de; x-ms-exchange-messagesentrepresentingtype: 1 x-microsoft-exchange-diagnostics: 1; HE1PR07MB0908; 23:y8DJ2h/QX1kUPLo6z4XP9tAy62ejhtbiiz6t0+Uf1rEae0xj36J1TOQonCuoPbPCFYoJnpccCzcMDX1kBMW0ZplUWgfntD744wtwmXR6Y3+GspgSdqvrHuHyZ17/l99ya041in4CxP859w/sjoXmCjuJbPMnMnVYxik4BVEu8y9+8W59fTLeQIvD3087xu35oroKprQLm82a6ff2G1tkug==; 5:JAIujYvlzGr4YaeyED9pTrRYY0HBxr0h4wbwnYuAjDB8C6+yJAYP0+/rAxUtX0Y3zQkJfa/x9wEzYMJbrH3gietsM5g1dENGwuT+oJwhX+bLLmixxxRPryoCraEYx0gvl4rkY8jsuElZww+otvoXcA==; 24:XZdaHnjDKflxDt3Fr8F4zmGYJXxzHZv6yTk4YbbNiGxowTY+O3XjFG2mctJVfeC5pQ6Wf0TrYkyJymYx5aoyAdmYMBCfdXXFxbJVSDUK84s= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR07MB0908; x-ms-office365-filtering-correlation-id: 30beed07-5ca7-447d-e434-08d339447977 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(102415293)(102615271)(82015046); SRVR:HE1PR07MB0908; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB0908; x-forefront-prvs: 08572BD77F x-forefront-antispam-report: SFV:NSPM; SFS:(7070004)(98900003); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1PR07MB0908; H:HE1PR07MB0905.eurprd07.prod.outlook.com; FPR:; SPF:None; MLV:ovrnspm; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: sct-15-1-409-10-msonline-outlook-d6129.templateTenant X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Feb 2016 15:51:08.7207 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB0908 On 19.02.2016 16:22, Jakub Jelinek wrote: > > Guess it is mostly reasonable (still, this is C++ FE, so I'd prefer > Jason to ack it), except for: > Here are updated versions of the cfns-patch and the pr69856-patch. Are they OK for trunk when boot-strap and reg-testing succeeds? Thanks Bernd. 2016-02-19 Bernd Edlinger PR c++/69865 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from here... (c_common_init_options): ...to here. (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99. Index: gcc/c-family/c-opts.c =================================================================== --- gcc/c-family/c-opts.c (revision 233557) +++ gcc/c-family/c-opts.c (working copy) @@ -246,6 +246,10 @@ c_common_init_options (unsigned int decoded_option } } + /* Set C++ standard to C++14 if not specified on the command line. */ + if (c_dialect_cxx ()) + set_std_cxx14 (/*ISO*/false); + global_dc->colorize_source_p = true; } @@ -802,10 +806,6 @@ c_common_post_options (const char **pfilename) && flag_no_builtin) flag_tree_loop_distribute_patterns = 0; - /* Set C++ standard to C++14 if not specified on the command line. */ - if (c_dialect_cxx () && cxx_dialect == cxx_unset) - set_std_cxx14 (/*ISO*/false); - /* -Woverlength-strings is off by default, but is enabled by -Wpedantic. It is never enabled in C++, as the minimum limit is not normative in that standard. */ @@ -1519,6 +1519,8 @@ set_std_cxx98 (int iso) flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; + flag_isoc94 = 0; + flag_isoc99 = 0; cxx_dialect = cxx98; lang_hooks.name = "GNU C++98"; }