role of "register" C keyword?

Daniel Jacobowitz
Thu May 6 20:36:00 GMT 2010

On Thu, May 06, 2010 at 01:22:27PM -0700, Ian Lance Taylor wrote:
> Basile Starynkevitch <> writes:
> > Long time ago (probably in the GCC 2.95 & 3.2 time frame) I would
> > imagine that the "register" keyword indeed affected register
> > allocation, in the sense that variables declared with register where
> > indeed & preferentially put in a machine register.
> I don't think the "register" keyword ever affected register allocation
> in gcc.  For that you have to go back to compilers of the 1970s.

I think it does, without optimization.  There's some unique GDB tests
that use this.  It causes them to be live between statements in a
machine register instead of always stored in stack slots.

This might not be current information though.

Daniel Jacobowitz

More information about the Gcc mailing list