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 surprise):

$ cat a.cc
#include "stdio.h"
main (){
int b(int *a);
register int a;
printf("%d\n", b(&a));
}
$ g++ -v a.cc
...
gcc version 4.4.3 20100108 (prerelease) (Debian 4.4.2-9)
...

--
Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html#Fortran

Reply via email to