Re: how to avoid a memset() optimization

"Arthur Chance" <usenet-1ugeabe@qeng-ho.org>
15 Nov 2002 00:40:17 -0500

          From comp.compilers

Related articles
[7 earlier articles]
Re: how to avoid a memset() optimization n2102139816.ch@chch.demon.co.uk (Charles Bryant) (2002-11-13)
Re: how to avoid a memset() optimization dobes@dobesland.com (Dobes Vandermeer) (2002-11-13)
Re: how to avoid a memset() optimization fjh@cs.mu.OZ.AU (Fergus Henderson) (2002-11-13)
Re: how to avoid a memset() optimization jvorbrueggen@mediasec.de (Jan C. =?iso-8859-1?Q?Vorbr=FCggen?=) (2002-11-13)
Re: how to avoid a memset() optimization usenet-1ugeabe@qeng-ho.org (Arthur Chance) (2002-11-13)
Re: how to avoid a memset() optimization cfc@shell01.TheWorld.com (Chris F Clark) (2002-11-15)
Re: how to avoid a memset() optimization usenet-1ugeabe@qeng-ho.org (Arthur Chance) (2002-11-15)
Re: how to avoid a memset() optimization joachim_d@gmx.de (Joachim Durchholz) (2002-11-17)
Re: how to avoid a memset() optimization cfc@shell01.TheWorld.com (Chris F Clark) (2002-11-20)
Re: how to avoid a memset() optimization thp@cs.ucr.edu (2002-11-24)
Re: how to avoid a memset() optimization n1096001003.ch@chch.demon.co.uk (Charles Bryant) (2002-12-01)
| List of all articles for this month |

From: "Arthur Chance" <usenet-1ugeabe@qeng-ho.org>
Newsgroups: comp.compilers
Date: 15 Nov 2002 00:40:17 -0500
Organization: would be a fine thing to have
References: 02-11-030 02-11-040 02-11-049 02-11-080
Keywords: C, comment
Posted-Date: 15 Nov 2002 00:40:17 EST

"Arthur Chance" <usenet-1ugeabe@qeng-ho.org> writes:
> I'm not a language lawyer, nor do I play one on TV, and am loathe to
> disagree with our esteemed moderator, but looking at my copy of the
> ANSI C spec I find section 5.1.2.3, third paragraph, second sentence:


Murphy's Law struck here. John was right and I misinterpreted the
standard. I realised my mistake 30 seconds after posting but John
obviously didn't see my mail asking him to ignore my erroneous
article.


> [I went back and looked at 5.1.2.3. From the context it's clear that
> the sentence means that calls to functions that modify storage and
> accesses to volatile storage are examples of side effects that require
> that an expression containing them to be evaluated. Hence a
> conformant compiler couldn't optimize away the memset() in the first
> place. As others have noted, there's lots of other places the key
> could be hanging around that no amount of buffer erasing would
> handle. -John]
[I didn't see the second message. Oh, well. -John]


Post a followup to this message

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