From patchwork Fri Feb 19 11:08:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Edlinger X-Patchwork-Id: 585144 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 E679B14030F for ; Fri, 19 Feb 2016 22:09:06 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=tOHtNQFW; 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:content-transfer-encoding:mime-version; q=dns; s= default; b=FZut6C8IgC2Tr11x9YrqZ29B8I9Af5jxlNJbEHDZLyKYsdVA2lQJD N22JOJs2qyL38a7zea0WhvpKEO8TVYLEqDbnezl5JChQlILbRcMEFcD68s/SzFWE Q5HJOEmIKQoTL9eUS4d02a3LAPsvKu8HeQzXCN6dhH7ByCELjeqEps= 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:content-transfer-encoding:mime-version; s=default; bh=JZEPqc58N7Us1lCQU5mvLiMSuv0=; b=tOHtNQFWz/jIB6kGhBONpT0Uhv0k +xwf4FLvx553e59h9JDOJVbBvUnv8SFCZKaSuWPgYPXN8Pa3TaVii1bjoPMlJfHo U3O90A73xFHLtUYL6Pn+k8hnZix5yy+KCegghygSyGDfVTxayOUusp6T3Zlj+TpY PcQiic9gcXC7mV0= Received: (qmail 84378 invoked by alias); 19 Feb 2016 11:09:00 -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 84358 invoked by uid 89); 19 Feb 2016 11:08:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=1249, 19022016, 19.02.2016 X-HELO: DUB004-OMC1S31.hotmail.com Received: from dub004-omc1s31.hotmail.com (HELO DUB004-OMC1S31.hotmail.com) (157.55.0.230) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Fri, 19 Feb 2016 11:08:54 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com ([157.55.0.238]) by DUB004-OMC1S31.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Fri, 19 Feb 2016 03:08:50 -0800 Received: from HE1PR07MB0905.eurprd07.prod.outlook.com (10.162.26.12) by HE1PR07MB0905.eurprd07.prod.outlook.com (10.162.26.12) with Microsoft SMTP Server (TLS) id 15.1.409.15; Fri, 19 Feb 2016 11:08:49 +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 11:08:49 +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 11:08:48 +0000 Message-ID: References: , <20160219105612.GA3017@tucnak.redhat.com> In-Reply-To: <20160219105612.GA3017@tucnak.redhat.com> authentication-results: gcc.gnu.org; dkim=none (message not signed) header.d=none; gcc.gnu.org; dmarc=none action=none header.from=hotmail.de; x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [GADvRoz5w3ugPYAEcvMrGNRTEzBLJNX7] x-microsoft-exchange-diagnostics: 1; HE1PR07MB0905; 23:ownDDOW4nQumg0MknJFk7BctITyGSH1blp+3kl8u73A58eRQfG8FIcJu3YNnPLlGsWcfqh839/m0yBsT7A6ItfZtP/3H8G5k8xYAfOfkS5GAfJTQNEoLwFv3VrgzlsTwppcJ3dsLBMJtZOjIXpLeell+bSEfDmHxjiEmNfL44doMMxLxaOfgnDTlREjhwLee4LnRDxQDVMjB3ETgiLvmMg==; 5:AHXkB/j0cPPXC2zDdSZdvF7XuKdzrDO6HodfJNykOsLUrpTyiPVSU4CcaQXDZFWEt3Td7ho2Knh31ODDgOS2IuHXXbWDl8XD5nuTBitUZu84JjHF/oR3DKA6IxLmm2IcM3vRh7ST7j3WqivYjvqMhg==; 24:GydirRYvX+khWTatMFLmNJnhMDXtNHQOmSHvi+mYdx3jI+LZ7a1DtoXssgGedpJLI+E5gAY11HFwwAe4ZaUrJpNKmYULYhMr1T4kC8+3qtk= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR07MB0905; x-ms-office365-filtering-correlation-id: 2d33e177-df33-4b66-6f23-08d3391d0b32 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(82015046); SRVR:HE1PR07MB0905; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB0905; x-forefront-prvs: 08572BD77F x-forefront-antispam-report: SFV:NSPM; SFS:(7070004)(98900003); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1PR07MB0905; 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 11:08:48.7973 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB0905 On 19.02.2016 11:56, Jakub Jelinek wrote: > > On Fri, Feb 19, 2016 at 10:50:34AM +0000, Bernd Edlinger wrote: > > While I think that we should probably not define __GNUC_GNU_INLINE__ at all for C++, > > because it is meaningless, I am warned that this could break (already broken) header files. > > It is not meaningless. The various headers need to know if it is safe to > use the gnu_inline attribute in C++. > > In any case, the desirable state is that e.g. the -E -dD output should be > identical if you explicitly request the default -std= version vs. if it is > set implicitly. We should verify it is the case even for C. > > Jakub I absolutely agree with you. The correct solution is probably doing this: and remove this hunk instead: @@ -786,7 +790,7 @@ c_common_post_options (const char **pfilename) /* By default we use C99 inline semantics in GNU99 or C99 mode. C99 inline semantics are not supported in GNU89 or C89 mode. */ if (flag_gnu89_inline == -1) - flag_gnu89_inline = !flag_isoc99; + flag_gnu89_inline = c_dialect_cxx () || !flag_isoc99; else if (!flag_gnu89_inline && !flag_isoc99) error ("-fno-gnu89-inline is only supported in GNU99 or C99 mode"); Would you like that better? Thanks Bernd. --- gcc/cp/cfns.h.jj 2016-01-04 15:30:50.000000000 +0100 +++ gcc/cp/cfns.h 2016-02-19 12:00:15.730375049 +0100 @@ -124,9 +124,6 @@ #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif #endif const char * libc_name_p (register const char *str, register unsigned int len)