[PATCH 20/265] ANSI-fied libX11
Thomas Dickey
dickey at his.com
Fri Apr 27 04:19:11 PDT 2007
On Fri, 27 Apr 2007, Glynn Clements wrote:
>
> Pat Kane wrote:
>
>>> + register Display *dpy,
>>
>>
>> Are those "register" keywords still useful?
>
> It's highly unlikely.
>
>> I have always been a bit ignorant on what "register" means,
>> is it a hint to the compiler or a hard requirement?
>
> Both. Whether or not the variable is actually stored in a register is
> up to the compiler, but taking the address of a "register" variable
> with the "&" operator is an error regardless of whether or not the
> compiler actually uses a register.
since the fragment doesn't use "&", that's unnecessary misdirection
back to the _topic_: whether the register keywords are useful or not
doesn't much matter. If some compilers don't simply discard the
information, removing the keywords would change the generated object code.
That's something that can be tested...
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
More information about the xorg
mailing list