Re: Possible ANSI C Optimisation Done in Practice?

ralph@inputplus.demon.co.uk (Ralph Corderoy)
22 Dec 2001 22:59:49 -0500

          From comp.compilers

Related articles
[6 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? ralph@inputplus.demon.co.uk (2001-12-20)
Re: Possible ANSI C Optimisation Done in Practice? RLWatkins@CompuServe.Com (R. L. Watkins) (2001-12-20)
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)
[1 later articles]
| List of all articles for this month |

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.


Post a followup to this message

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