role of register C keyword?

2010-05-06 Thread Basile Starynkevitch
Hello All, What is the role of the register keyword [=storage class specifier] in C ( C++) in the current GCC compiler? IIRC, (from my human rusty memory, I don't have the documents on hand) the current standard only requires that variable declared with the register class should not have their

Re: role of register C keyword?

2010-05-06 Thread Jonathan Wakely
On 06/05/2010, Basile Starynkevitch wrote: IIRC, (from my human rusty memory, I don't have the documents on hand) the current standard only requires that variable declared with the register class should not have their adress taken thru the unary operator, and might have some imprecise

Re: role of register C keyword?

2010-05-06 Thread Toon Moene
On 05/06/2010 08:35 PM, Jonathan Wakely wrote: On 06/05/2010, Basile Starynkevitch wrote: [ register variable ] In C++ it's only a hint, which the compiler is free to ignore. Its use will be deprecated in C++1x. Indeed, g++ won't even complain about taking its address (much to my

Re: role of register C keyword?

2010-05-06 Thread Ian Lance Taylor
Basile Starynkevitch bas...@starynkevitch.net 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

Re: role of register C keyword?

2010-05-06 Thread Jakub Jelinek
On Thu, May 06, 2010 at 01:22:27PM -0700, Ian Lance Taylor wrote: Basile Starynkevitch bas...@starynkevitch.net 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

Re: role of register C keyword?

2010-05-06 Thread Daniel Jacobowitz
On Thu, May 06, 2010 at 01:22:27PM -0700, Ian Lance Taylor wrote: Basile Starynkevitch bas...@starynkevitch.net 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