Re: Possible ANSI C Optimisation Done in Practice?

Toon Moene <toon@moene.indiv.nluug.nl>
24 Dec 2001 00:10:00 -0500

          From comp.compilers

Related articles
[9 earlier articles]
Re: Possible ANSI C Optimisation Done in Practice? ralph@inputplus.demon.co.uk (2001-12-20)
Re: Possible ANSI C Optimisation Done in Practice? nmm1@cus.cam.ac.uk (2001-12-20)
Re: Possible ANSI C Optimisation Done in Practice? nmm1@cus.cam.ac.uk (2001-12-22)
Re: Possible ANSI C Optimisation Done in Practice? ralph@inputplus.demon.co.uk (2001-12-22)
Re: Possible ANSI C Optimisation Done in Practice? ralph@inputplus.demon.co.uk (2001-12-24)
Re: Possible ANSI C Optimisation Done in Practice? nmm1@cus.cam.ac.uk (2001-12-24)
Re: Possible ANSI C Optimisation Done in Practice? toon@moene.indiv.nluug.nl (Toon Moene) (2001-12-24)
Re: Possible ANSI C Optimisation Done in Practice? nmm1@cus.cam.ac.uk (2001-12-27)
Re: Possible ANSI C Optimisation Done in Practice? david.thompson1@worldnet.att.net (David Thompson) (2001-12-27)
Re: Possible ANSI C Optimisation Done in Practice? david.thompson1@worldnet.att.net (David Thompson) (2002-01-03)
Re: Possible ANSI C Optimisation Done in Practice? ralph@inputplus.demon.co.uk (2002-01-05)
| List of all articles for this month |
From: Toon Moene <toon@moene.indiv.nluug.nl>
Newsgroups: comp.compilers
Date: 24 Dec 2001 00:10:00 -0500
Organization: Moene Computational Physics, Maartensdijk, The Netherlands
References: 01-12-050 <200112120335.fBC3ZMg01140@budgie.cs.uwa.edu.au> 01-12-065 01-12-104 01-12-118 01-12-121
Keywords: C, optimize, GCC
Posted-Date: 24 Dec 2001 00:10:00 EST

Nick Maclaren wrote:


> [It seems to me that since the compiler is allowed to treat strlen() as
> a special case, part of the special case could include knowledge that its
> version of strlen doesn't change errno. -John]


While this is true, theoretically, there is a reason why GCC currently
allows you to indicate that math functions cannot change errno (this
was inspired because Fortran cried for it, but it useful for
IEEE-compliant programs too).


The reason, of course, is that - once known as a prerequisite - these
things get enshrined in compilers, especially ones that start out as
C-only compilers ...
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.