[PATCH] remove all "register" storage class specifiers

Robert P. J. Day rpjday at mindspring.com
Mon Mar 27 11:48:08 UTC 2006


On Mon, 27 Mar 2006, Bernd Petrovitsch wrote:

> On Mon, 2006-03-27 at 13:31 +0200, Peter S. Mazinger wrote:
> > On Mon, 27 Mar 2006, Robert P. J. Day wrote:
> >
> > >
> > >   (ok, all except for those under the "scripts" directory as
> > > those can be processed separately.  the subsequent build makes
> > > no difference whatsoever in the output of "make sizes".)
> >
> > Couldn't this be a compiler version dependency?
>
> This is for sure compiler-dependent, but the "register" (and BTW
> "inline) keyword were never more than a hint to the compiler which
> variable should be in a register (or which function should be
> inlined) and all C compilers are free to ignore that hint. Nowadays
> gcc and almost all C compilers are better at register allocation
> than humans (and it is quite similar for "inline" functions - of
> course except the cases in kernels etc. where the hardware requires
> inling).

it was always *possible* that removing an instance of a "register"
storage class specifier might have made a small difference in size.
what would have been *really* surprising, of course, is if doing that
just flat-out broke something.  now *that* would have been exciting.

rday



More information about the busybox mailing list