[tz] bringing tzcode in the ANSI era

Paul Eggert eggert at cs.ucla.edu
Fri Oct 26 16:55:26 UTC 2012

On 10/26/2012 04:10 AM, Arthur David Olson wrote:

> the declaration can be both a hint to the compiler and a mental
> aid for aging humans (such as yours truly).

These days 'register' typically doesn't help the compiler.
I just now built the 2012g distribution on my platform
(Fedora 17 x86-64, GCC 4.7.2) and the code was the same
regardless of whether I compiled with '-Dregister='.

The mental aid for aging humans is more important, and is an
issue that I'm sympathetic to, as I'm aging myself.  To be
honest I find that 'register' hurts my understanding of the
code a bit more than it helps.  Its cost is noise that slows
me down when I'm trying to figure out what the code actually
does; its benefit is that it tells me that the address of a
local is never taken.  To my eyes the cost is small but the
benefit is even smaller: I can easily determine myself
whether the address is taken on the rare occasions when I
need or want to know that.

If you continue to find 'register' useful, I'd rather
leave it in, as its cost in readability is pretty small,
at least to my eyes.  It might help to put in
a comment summarizing the above, though, in case the issue
comes up again -- maybe in README?

More information about the tz mailing list