From patchwork Mon Nov 14 09:55:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 82031 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp927549qge; Mon, 14 Nov 2016 01:56:35 -0800 (PST) X-Received: by 10.98.15.206 with SMTP id 75mr34770875pfp.105.1479117395253; Mon, 14 Nov 2016 01:56:35 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id w18si21580666pfg.227.2016.11.14.01.56.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Nov 2016 01:56:35 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-441319-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-441319-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-441319-patch=linaro.org@gcc.gnu.org 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:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=kBKIw1mVHfgZQpHN Tvj9C3Lj7FQ8CIk/YeRI2mcqWn0Jv9hiM1wiXYuTeQTXGJPtyv1NvtnIdJBBgqw3 iBCEu3qezLC8gehB4d7tFKZNwKqlZUnas3c/3b5MqarHa1WLlNgkzbtFAQfWXw76 6R8eu7xiGjz1Ev4gR0ZC670tm9E= 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:in-reply-to:references :mime-version:content-type; s=default; bh=Yt35fvzYro/8t6XAXSSaXw QtmYw=; b=fWBZ3DB4AtmrlWACOJw8wm7Kw9zThG7tIDHhPlB6M984ZCCSUyRaNb RGwxirO/MrZ9imsvmfBVe7ZErNPUddQwsmixk21lcRt0G3EimrGn9YnhuNH0UeB4 4TF//TpGhNtdsk9vXZwc2BQGwThzDhZqIXf7RRzyi2QNZ/zkgDBn8= Received: (qmail 64313 invoked by alias); 14 Nov 2016 09:56: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 63548 invoked by uid 89); 14 Nov 2016 09:56:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=wood, knew, Moreover, Language X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-ve1eur01on0079.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (104.47.1.79) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Nov 2016 09:56:04 +0000 Received: from AM4PR0802CA0018.eurprd08.prod.outlook.com (10.172.214.28) by HE1PR0801MB1785.eurprd08.prod.outlook.com (10.168.150.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10; Mon, 14 Nov 2016 09:55:59 +0000 Received: from AM1FFO11OLC005.protection.gbl (2a01:111:f400:7e00::195) by AM4PR0802CA0018.outlook.office365.com (2603:10a6:200:57::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10 via Frontend Transport; Mon, 14 Nov 2016 09:55:57 +0000 Authentication-Results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; codesourcery.com; dkim=none (message not signed) header.d=none; codesourcery.com; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 217.140.96.140 as permitted sender) receiver=protection.outlook.com; client-ip=217.140.96.140; helo=nebula.arm.com; Received: from nebula.arm.com (217.140.96.140) by AM1FFO11OLC005.mail.protection.outlook.com (10.174.64.132) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.721.5 via Frontend Transport; Mon, 14 Nov 2016 09:55:57 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:780; Count:13 Received: from e107456-lin.cambridge.arm.com (10.1.2.79) by mail.arm.com (10.1.106.66) with Microsoft SMTP Server id 14.3.294.0; Mon, 14 Nov 2016 09:55:49 +0000 From: James Greenhalgh To: CC: , , Subject: Re: [Patch 5/17] Add -fpermitted-flt-eval-methods=[c11|ts-18661-3] Date: Mon, 14 Nov 2016 09:55:47 +0000 Message-ID: <1479117347-33829-1-git-send-email-james.greenhalgh@arm.com> In-Reply-To: <58269DB8.40804@codesourcery.com> References: <58269DB8.40804@codesourcery.com> MIME-Version: 1.0 X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(336003)(377424004)(189002)(24454002)(377454003)(199003)(92566002)(586003)(229853002)(110136003)(87936001)(5660300001)(2950100002)(106466001)(189998001)(230783001)(568964002)(6916009)(512874002)(33646002)(8676002)(2351001)(2906002)(84326002)(8936002)(26826002)(50226002)(246002)(356003)(7846002)(76176999)(50986999)(5890100001)(104016004)(36756003)(2476003)(86362001)(4326007)(77096005)(4610100001)(305945005)(626004); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0801MB1785; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11OLC005; 1:ex6hznH/mHgXKCM88/8D6hjhD88XM5S0h4j8L4dxjWm4PAKeP+sddruq2JIp9i21z75da6Le5VlDB4FkezmT5oflCy0Gz+bS4NOT+RCvTmXZIczMfewndNEXR/PhjPwvjasp+CDY3ejxtCBMne5BtO1ikLRdVezhRjPKRlvpFG4c1+43m7s9lMbqGumv6ntOCxQIRT4yjxW73f7vhh85xWyivaYTRY5GQ1Um5uWotbXREaLLF6+8uZ6Y0oEskDWGUpJ/1u/P3LoJ2IhuWANADRXM0UOF+M6oNc3GFieH5bOsLH+FO502zBcldFNp15A6iPCTxv0nLC9TM5gihvqlOYfl//uspQ2z1+ngkuyN/kKooGu/CuF74f4asoKAW5W2eXMEsij+uAiUpPxIMw8ZwF5DZygnAUh+27F1FxFgTKGbS2rJqGF2czrWqAYXagrFXrQpa4FfENPod2QdKep5mMz9hwY7a837EqWIjpHAsHrcpHcOfLwttG4tTE7nEMOHV7C1PbZwx5Chpe0+uB/kLTpc/q4PtsgGfPZh92OSF1ukcc8uLlEyPMwgmcL6YFK39MHVfPoOBuoi+JRhI6MS/gvJPnUDmJEdkAWV+i/CjfI= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1785; 2:HLOWUwsq4oWPiiXIcjjvutWUMxkutEhevcuw/lbez1g4p2Wy6/5oR7C310vb0NpTwZNEGWsDO4O6KOGBjDpR0USJkynx6sIFg+ysvIw0WT8g10QCqsJ7RJuvtscutKxAWluQ9NDZiOOxODru+e7nOIS8RDsPqEcCKUMMkcQeIqQ=; 3:hADANBGQbAsnjDzOgBuHlATYFDqcjAFs/uy3agEYvpdUoSYsCJC+eMb3veqdIsXQX5e2tKF/Bz3cz3P9iuhPZSf+ORHwCge/m7VjeTFQn69+sHTuKpFlcPQjA83DC8vki/dZD+9fe5MTOJjUzKnASEwvtu9KGTz9ZDGv4psD2YvjPcCrrZ9Y33GqPRb29YomKnAUWL8IoA5MvHODSZdkmnl7kbW/jkJCFBxrNQXZLweiZ8tRPfK9pUGNiej3cu411nm3e8a7HAA1ZXyxHTzP3KRsdfA6Lwp66jliKUxyKYU= X-MS-Office365-Filtering-Correlation-Id: 480b3b83-248e-48fa-cff7-08d40c746e51 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:HE1PR0801MB1785; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1785; 25:Il2dj4o6CDsjQbynsr+XkyPsPbaNQLbxPbRsmzkO7RAj+Iv8LTqUYpOITd1Kny31s0PvAFgq9pTf/74roECeD/RA9+13ovo3DgNxyt+/U3YMdqPWgHRJ2jpBp2txlEfPYSJg7fQZsgGj12SM8979mTkSmepeHX9PmM9i0nc20fjHul0u/2aetunnfRu5XqVxoMg3NOjTn6qAUVwyuewSFE7xar1VmSOwp6K8X9FEi7iQryCgzkc6RDu+QD6c9eHhdRwHPCZOI9Eg95cFLjguuN/UL++DEw6jotmGfm191RUl2OC10iQ+vs4lYRC29VrFEZrw/IuE8F6c+OcR5BHxHtDLdjWm1rMBoQVhh2OKlECUzao6ZX7OB+bXfYf1oARqgDOvQBHkaTNouw2ag5uZY7CXKY12sWt7iElLrnAUqnlyY1NHRyPyrnMEJM6f+XDyylufSTC0ar4uWNmP2oxbSZ2L9kh/dx89iRIAhZA6je0/rVZxNpBas9Wcp9k69uVMdxQUeS+BXypjE/zCgRDwXvEhgj3HsouBzkfZ/3iUKC8tBhn7TPfxhuTOFlSMQTBFmRXyCgxAWPfbzSKsnuDnr8kTKqibpZnALFindwFGv6FSRYgJC3f6gLfsVdg96ve7/pHcP2UpDtABWNmXA3t80HtFeRyTRuVfR5v9xRv/12rDjRFIZIRf2BPsItA3/qR7lv2HnWWUyyB5RqcOK/PHPBxUXyQzNOzaL2AG/0NghtiMSgkKQC6dpFVU7kwIWHAdO0TX9OeUOunNzvDpDZZAa2k3Zjhk3qdcuSnIgcq3KNN3NoY45+zFK7DGX3WtHAPrsJSCtno9rK0eyWzQ3E0RzBTumE1V8MUaBb7jqVZjyHLFgXiU/lqIX45kFtAMlUQR4/LXJFMjMqLR/+/WHn1w1A== X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1785; 31:RE9XeEhCSTeV2PSMsbrd9xrnWSdvWMySc5MNnGXtOeyJZ5pcwDzyssg9q3HueT1GPOLcD0HKzUSfeVkuE5jpsnfm3E9tsaVOOVc+fnfErXTDTjvukcAV2wtfApl2Bv9FDsMTWjWYg2NdmeRtP+KVmJFUmzs2R2Jfr3HLH0ZIgMcNrKStYlpErs8ci5YpELMySBgjL+LhKqWIDe98INgay+e9jB3MUUlN2sjTKAci7ItQQVlIQ8TZ3vpWBFzeBh+7JSraMKXZd93JqhR2xv5bFGY7sNb9kPA62la2NvtvVm2gjtAtnibkPf0FHmK1WrHr; 20:hWqLssA/At8Ke3oy279fGZlJVU6t7H32B9nWkp3OAZzZQm65tJIZEbnLEBBnT2OWy2DwaL1+8Hbk5ZFG6c9HmBLw3xipRIoTq29SXfVPIotsOn29AuvR/+oyCf8dTHK/BTkDwpFvLB4qwHFpBS7MSTzYpk/Cpu/RYwctUMGH7ufUbbB6GVyBoiLZYgwFuPmMq2sozLpAoJck55YpdcGo3Zi3exbYT1qdK+J+gIvF1z4TiFtjUBp/CDciYJPUxv57 NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415395)(6060326)(601004)(2401047)(13023025)(8121501046)(5005006)(13013025)(13020025)(13024025)(3002001)(10201501046)(6055026)(6061321); SRVR:HE1PR0801MB1785; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0801MB1785; X-Microsoft-Exchange-Diagnostics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1785; 6:WJAsSzWiCWCdop2KIT8SBO5MXnGDjBWf+VqU7ZgQNrCZNJE0bR7fADfiSSRe0PqEWk8sILEYSLccnlGaE50t4LEDx5vzycLB9GyuSajhg6GZ0M2HS2FMiaCFnJANB24exPavbiNW/W9V/beCv5pNfzd7dmA0pcseUjBuBvSz1HLeDzhRyGS+nYgQUyLzhnE0k2R/9NdEzSYQiPvvscewgkl5yTMXZbjY8AzrxxnTIZUfp5bhxSCAMS04N/fGT/ohJnDURd1VWPEsWphhOfo495Qibj6xXcbhnQ9Affi5bSpklKTk0X62LpOf/XoU4mGlKua2BEYjR0163T39KpEFA5emYBxUnju/CuUcSHnk4sE3D/chT6R+w1JoTdWypqVI; 5:dTHuBG6Z/rYNGUFuwCxZE9Vp5uKhOa1xDgXNiWSCY35vOumZd2/IwNdhcUDFIMeQoYLCgnYEqswU9URnNNT1/TbTXGbDnUNt4H39BcnuWUg3lOk/GxI3gFvIB3h4ZHn67LNRbwzVFt0D4QrHNg1J6g==; 24:OqbFSD9FbGvpr5JzD0Ij/At4xIM8mYx9otA8Dbn8BaGWi/WkNvCFp0sur2V1DsknE9i9zez08xtNaXMBr00WaENwVl5tvXDpMxnCzbjzycM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1785; 7:0MkG4cRs60hRIGe5dvHRuB691GnLwFV5xgHvWImC007iCyt6smtQoTKlyiGrRxvNp9z6tU5BolzBVbpBADmz+fCXVA5M3374xeARPn7XMb9HIAQPAkTl3gr3Z0vdEuIjxj8yx7KAADci7aQq/HsdfHpL6qteZxA1zPtl79bQlMpkTFBVWWZ5replYkTOafhPcfiejFEKFFAIRgzCi37ntfAY/o1Ul6LGIcKv8OORYdFfU3OZaHec8KbaPRlwJ7i3j26R4ZddNn788uS4i4QVuAOqo1bNBvLC7d7m2op7wZRqWbhy63cVq2enYVGm6P5vnYveyQ4JyYYBjBqEQ8t+2hOlpmc6045qaVT07Gc0c7I= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2016 09:55:57.0181 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1785 X-IsSubscribed: yes On Fri, Nov 11, 2016 at 09:42:32PM -0700, Sandra Loosemore wrote: > On 11/11/2016 08:37 AM, James Greenhalgh wrote: > > >diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > >index f133b3a..75ff8ec 100644 > >--- a/gcc/doc/invoke.texi > >+++ b/gcc/doc/invoke.texi > >@@ -378,7 +378,8 @@ Objective-C and Objective-C++ Dialects}. > > -flto-partition=@var{alg} -fmerge-all-constants @gol > > -fmerge-constants -fmodulo-sched -fmodulo-sched-allow-regmoves @gol > > -fmove-loop-invariants -fno-branch-count-reg @gol > >--fno-defer-pop -fno-fp-int-builtin-inexact -fno-function-cse @gol > >+-fno-defer-pop -fno-fp-int-builtin-inexact @gol > >+-fpermitted-flt-eval-methods=@var{standard} -fno-function-cse @gol > > -fno-guess-branch-probability -fno-inline -fno-math-errno -fno-peephole @gol > > -fno-peephole2 -fno-sched-interblock -fno-sched-spec -fno-signed-zeros @gol > > -fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol > > This seems like totally the wrong place to document this. The new > option seems more like a code generation option than an optimization > option, which is what the context of the above patch hunk is. > Moreover, the list above is alphabetized and you're sticking the new > option in a totally random place within the list. Oh! Definitely a case of not seeing the wood for the trees there. All I knew was that the option was a little bit like -fexcess-precision, but I completely failed to spot that this list was alpahbetised, or even to see that the list related to optimisation options! Sorry for that, I've moved it now to "C Language Options" - which as far as I can tell is not in alphabetical order, I slotted it in after gnu89-inline as that made sense to me, but I can move it again if you like. Is that placement more acceptable? Thanks, James --- gcc/c-family/ 2016-11-09 James Greenhalgh * c-opts.c (c_common_post_options): Add logic to handle the default case for -fpermitted-flt-eval-methods. gcc/ 2016-11-09 James Greenhalgh * common.opt (fpermitted-flt-eval-methods): New. * doc/invoke.texi (-fpermitted-flt-eval-methods): Document it. * flag_types.h (permitted_flt_eval_methods): New. gcc/testsuite/ 2016-11-09 James Greenhalgh * gcc.dg/fpermitted-flt-eval-methods_1.c: New. * gcc.dg/fpermitted-flt-eval-methods_2.c: New. diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index de260e7..57717ff 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -788,6 +788,18 @@ c_common_post_options (const char **pfilename) && flag_unsafe_math_optimizations == 0) flag_fp_contract_mode = FP_CONTRACT_OFF; + /* If we are compiling C, and we are outside of a standards mode, + we can permit the new values from ISO/IEC TS 18661-3 for + FLT_EVAL_METHOD. Otherwise, we must restrict the possible values to + the set specified in ISO C99/C11. */ + if (!flag_iso + && !c_dialect_cxx () + && (global_options_set.x_flag_permitted_flt_eval_methods + == PERMITTED_FLT_EVAL_METHODS_DEFAULT)) + flag_permitted_flt_eval_methods = PERMITTED_FLT_EVAL_METHODS_TS_18661; + else + flag_permitted_flt_eval_methods = PERMITTED_FLT_EVAL_METHODS_C11; + /* 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) diff --git a/gcc/common.opt b/gcc/common.opt index 314145a..915c406 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1326,6 +1326,21 @@ Enum(excess_precision) String(fast) Value(EXCESS_PRECISION_FAST) EnumValue Enum(excess_precision) String(standard) Value(EXCESS_PRECISION_STANDARD) +; Whether we permit the extended set of values for FLT_EVAL_METHOD +; introduced in ISO/IEC TS 18661-3, or limit ourselves to those in C99/C11. +fpermitted-flt-eval-methods= +Common Joined RejectNegative Enum(permitted_flt_eval_methods) Var(flag_permitted_flt_eval_methods) Init(PERMITTED_FLT_EVAL_METHODS_DEFAULT) +-fpermitted-flt-eval-methods=[c11|ts-18661] Specify which values of FLT_EVAL_METHOD are permitted. + +Enum +Name(permitted_flt_eval_methods) Type(enum permitted_flt_eval_methods) UnknownError(unknown specification for the set of FLT_EVAL_METHOD values to permit %qs) + +EnumValue +Enum(permitted_flt_eval_methods) String(c11) Value(PERMITTED_FLT_EVAL_METHODS_C11) + +EnumValue +Enum(permitted_flt_eval_methods) String(ts-18661-3) Value(PERMITTED_FLT_EVAL_METHODS_TS_18661) + ffast-math Common Optimization diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index eb89804..0ec10ba 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -178,6 +178,7 @@ in the following sections. @item C Language Options @xref{C Dialect Options,,Options Controlling C Dialect}. @gccoptlist{-ansi -std=@var{standard} -fgnu89-inline @gol +-fpermitted-flt-eval-methods=@var{standard} @gol -aux-info @var{filename} -fallow-parameterless-variadic-functions @gol -fno-asm -fno-builtin -fno-builtin-@var{function} @gol -fhosted -ffreestanding -fopenacc -fopenmp -fopenmp-simd @gol @@ -1872,6 +1873,30 @@ The preprocessor macros @code{__GNUC_GNU_INLINE__} and in effect for @code{inline} functions. @xref{Common Predefined Macros,,,cpp,The C Preprocessor}. +@item -fpermitted-flt-eval-methods=@var{style} +@opindex fpermitted-flt-eval-methods +@opindex fpermitted-flt-eval-methods=c11 +@opindex fpermitted-flt-eval-methods=ts-18661-3 +ISO/IEC TS 18661-3 defines new permissible values for +@code{FLT_EVAL_METHOD} that indicate that operations and constants with +a semantic type that is an interchange or extended format should be +evaluated to the precision and range of that type. These new values are +a superset of those permitted under C99/C11, which does not specify the +meaning of other positive values of @code{FLT_EVAL_METHOD}. As such, code +conforming to C11 may not have been written expecting the possibility of +the new values. + +@option{-fpermitted-flt-eval-methods} specifies whether the compiler +should allow only the values of @code{FLT_EVAL_METHOD} specified in C99/C11, +or the extended set of values specified in ISO/IEC TS 18661-3. + +@var{style} is either @code{c11} or @code{ts-18661-3} as appropriate. + +The default when in a standards compliant mode (@option{-std=c11} or similar) +is @option{-fpermitted-flt-eval-methods=c11}. The default when in a GNU +dialect (@option{-std=gnu11} or similar) is +@option{-fpermitted-flt-eval-methods=ts-18661-3}. + @item -aux-info @var{filename} @opindex aux-info Output to the given filename prototyped declarations for all functions diff --git a/gcc/flag-types.h b/gcc/flag-types.h index 6c5a4cc..d69f8f4 100644 --- a/gcc/flag-types.h +++ b/gcc/flag-types.h @@ -158,6 +158,14 @@ enum excess_precision EXCESS_PRECISION_STANDARD }; +/* The options for which values of FLT_EVAL_METHOD are permissible. */ +enum permitted_flt_eval_methods +{ + PERMITTED_FLT_EVAL_METHODS_DEFAULT, + PERMITTED_FLT_EVAL_METHODS_TS_18661, + PERMITTED_FLT_EVAL_METHODS_C11 +}; + /* Type of stack check. */ enum stack_check_type { diff --git a/gcc/testsuite/gcc.dg/fpermitted-flt-eval-methods_1.c b/gcc/testsuite/gcc.dg/fpermitted-flt-eval-methods_1.c new file mode 100644 index 0000000..c022f86 --- /dev/null +++ b/gcc/testsuite/gcc.dg/fpermitted-flt-eval-methods_1.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-std=c11" } */ + +/* Test that we only see the C99/C11 values for __FLT_EVAL_METHOD__ if + we are compiling with -std=c11. */ + +int main (int argc, char** argv) +{ + switch (__FLT_EVAL_METHOD__) + { + case 0: + case 1: + case 2: + case -1: + return 0; + default: + return 1; + } +} diff --git a/gcc/testsuite/gcc.dg/fpermitted-flt-eval-methods_2.c b/gcc/testsuite/gcc.dg/fpermitted-flt-eval-methods_2.c new file mode 100644 index 0000000..a76ea7e --- /dev/null +++ b/gcc/testsuite/gcc.dg/fpermitted-flt-eval-methods_2.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-fpermitted-flt-eval-methods=c11" } */ + +/* Test that we only see the C99/C11 values for __FLT_EVAL_METHOD__ if + we are compiling with -fpermitted-flt-eval-methods=c11. */ + +int main (int argc, char** argv) +{ + switch (__FLT_EVAL_METHOD__) + { + case 0: + case 1: + case 2: + case -1: + return 0; + default: + return 1; + } +}