D
dssuresh6
I have a few doubts regarding the register variable. Though the C
standard says that it is illegal to access the address of a register
variable, the GCC compiler gave only warning. At run-time also, there
was no error (probably, the register variable is converted into an
'auto' variable by the compiler).
Suppose the register variable is not converted into 'auto' variable,
then at run-time, will it give error? So far I've not come across a
situation where the variable declared as 'register' is actually put
into a register. It looks like everytime the GCC compiler turns it into
'auto' variable. From a program, how to find whether the variable is
actually put into a register or it is made an auto variable?
standard says that it is illegal to access the address of a register
variable, the GCC compiler gave only warning. At run-time also, there
was no error (probably, the register variable is converted into an
'auto' variable by the compiler).
Suppose the register variable is not converted into 'auto' variable,
then at run-time, will it give error? So far I've not come across a
situation where the variable declared as 'register' is actually put
into a register. It looks like everytime the GCC compiler turns it into
'auto' variable. From a program, how to find whether the variable is
actually put into a register or it is made an auto variable?