Short code to determine compiler's

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Jul 23 20:48:24 AEST 1989


In article <1038 at cernvax.UUCP> hjm at cernvax.UUCP (Hubert Matthews) writes:
>So, does "register" help or hinder?

You already answered your own question.  The appearance of the "register"
storage-class specifier allows the compiler to know of certain constraints
on the variable's usage, which can never hurt optimization.  There are
already compilers that ignore "register" (except for diagnosing attempts
to take its address), showing that it can't really hinder optimization.
There are also a large number of compilers in daily use that do take
the "register" specification into account when generating code.  For such
compilers it obviously helps, assuming that the programmer has applied
"register" wisely.



More information about the Comp.lang.c mailing list