From: | ralph@inputplus.demon.co.uk (Ralph Corderoy) |
Newsgroups: | comp.compilers |
Date: | 22 Dec 2001 22:59:49 -0500 |
Organization: | InputPlus Ltd. |
References: | 01-12-050 01-12-104 01-12-118 01-12-121 |
Keywords: | C, optimize |
Posted-Date: | 22 Dec 2001 22:59:49 EST |
Hi Nick,
> This is legal, if insane. What is worse, is that strlen is allowed
> to set errno at whim (C99 7.5 paragraph 3), which makes the whole
> function effectively unoptimisable.
>
> ...
>
> [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]
Our moderator beat me too it :-)
Anyone help on the techniques used to determine modifying *t doesn't
affect s?
Ralph.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.