Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: "Derek M. Jones" Newsgroups: comp.compilers Subject: Re: Optimization techniques Date: Fri, 26 Apr 2019 13:39:58 +0100 Organization: virginmedia.com Lines: 18 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <19-04-026@comp.compilers> References: <19-04-004@comp.compilers> <19-04-012@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="53580"; mail-complaints-to="abuse@iecc.com" Keywords: optimize, design, comment Posted-Date: 26 Apr 2019 15:12:47 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Content-Language: en-US Xref: csiph.com comp.compilers:2210 All, On 19/04/2019 23:27, Hans-Peter Diettrich wrote: > I'm always a bit sceptic when C/C++ and "safe" occur in the same > sentence. AFAIR a C compiler is allowed to ignore parentheses when > reordering expressions, what can lead to numeric instabilities. Not true: "In the abstract machine, all expressions are evaluated as specified by the semantics. " https://c0x.coding-guidelines.com/5.1.2.3.html -- Derek M. Jones blog:shape-of-code.coding-guidelines.com [Keeping in mind the "as if" rule which lets the compiler do whatever it wants so long as the result is the same. -John]