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)
Return to the
comp.compilers page.
Search the
comp.compilers archives again.