[PATCH] remove all "register" storage class specifiers

Bernd Petrovitsch bernd at firmix.at
Mon Mar 27 12:16:50 UTC 2006


On Mon, 2006-03-27 at 06:48 -0500, Robert P. J. Day wrote:
> 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.

Yes (did I write anything different?), but in both directions.
And it really depends on the compiler, version, arch+CPU, options, ...

> what would have been *really* surprising, of course, is if doing that
> just flat-out broke something.  now *that* would have been exciting.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




More information about the busybox mailing list