comp.lang.c
[Top] [All Lists]

Re: Experiences using "register"

Subject: Re: Experiences using "register"
From: Flash Gordon
Date: Mon, 31 Mar 2008 21:56:51 +0100
Newsgroups: comp.lang.c


Herbert Rosenau wrote, On 31/03/08 20:22:
On Sat, 29 Mar 2008 17:44:21 UTC, Ioannis Vranos <ivranos@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

"register" is part of the language standard, if a compiler considers it
unneeded, it is free to ignore it. Proper uses of "register" making the
compiler to produce less-efficient code than not using it at all, is a
compiler-defect.

Yes, but since C98/99 its free to the compiler simply ignoring 'register'. That means it is the right to the compiler to replace the keyword register with white space.

Not quite. If you attempt to take the address of a register variable the compiler is required to produce a diagnostic. Apart from that, just it can ignore it.

Oh, and I assume you meant C89 not C98 since I don't believe this has changed.
--
Flash Gordon

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy