Date: Wed, 17 Mar 1999 12:31:52 -0600 (CST) From: Anthony Kimball <alk@pobox.com> To: imp@harmony.village.org Cc: chat@FreeBSD.ORG Subject: Re: Use of "register" in code Message-ID: <14063.61620.377777.138942@avalon.east> References: <14063.12923.464399.183283@avalon.east> <199903170542.WAA07396@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoth Warner Losh on Tue, 16 March: : : How? I can think of no way that removing the register part of a : declaration can cause this (eg register int foo -> int foo). Nice catch. I now believe that one cannot, within the bounds of ANSI C; however, code which relies upon implementation-specific behaviours may be rendered "disfunctional". (My use of "correct" was a bad one.) I know this is true because the compiler generates different code in the two cases. Any program which relies upon that difference to function correctly will become disfunctional, unless the compiler detects such a dependency and adapts accordingly. My imagination -- and, more to the point, my knowledge of the available implementation, gcc -- is taxed beyond its current limits when I try to generate examples which won't (justifiably) earn derision as absurdly bad code, so I must weaken my claim in this way: Since it is not provable from or required by the standard or the implementation specification that the change will not result in defects in code which depends upon unspecified features of the implementation, the code cannot be guaranteed to retain correctness when those unspecified features change. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14063.61620.377777.138942>