From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,acba876b1e3c9639 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!cleanfeed2-b.proxad.net!nnrp4-1.free.fr!not-for-mail Return-Path: From: Duncan Sands To: comp.lang.ada@ada-france.org Subject: Re: GNAT Optimization of Constant Expressions Date: Fri, 18 May 2007 19:08:54 +0200 User-Agent: KMail/1.9.6 References: <1179355028.624745.258370@q75g2000hsh.googlegroups.com> <1179502786.146161.217520@o5g2000hsb.googlegroups.com> In-Reply-To: <1179502786.146161.217520@o5g2000hsb.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: amavisd-new at ada-france.org Cc: David Smith X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.9rc1 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.ada Message-ID: X-Leafnode-NNTP-Posting-Host: 88.191.17.134 Organization: Guest of ProXad - France NNTP-Posting-Date: 18 May 2007 19:10:07 MEST NNTP-Posting-Host: 88.191.14.223 X-Trace: 1179508207 news-2.free.fr 29406 88.191.14.223:39857 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:15833 Date: 2007-05-18T19:10:07+02:00 > > Can you please post your C equivalent. > > Of course: Thanks. As expected, the sin etc function calls have been replaced with explicit constants before the real gcc optimizers even run! "Fold" is responsible. The difference with Ada is that the Ada sin etc functions are not recognized by fold. Ciao, Duncan.