A to co:
E:\Marcin\temp\2005-08-04>g++ -W -Wall -pedantic reg.cpp
reg.cpp: In function int main()': reg.cpp:5: warning: address requested for
c', which is declared `register'
??
Ty czytasz, czy coś innego robisz z tą książką?? :>
3.11.2 (str. 106)
(...)Kompilator może, lecz nie musi umieścić zmiennej w rejestrze(...)
A po tym
&c
to na pewno nie umieści w rejestrze...
C++ Standard napisał(a)
7.1.1 Storage class specifiers
(...)
3 A register specifier has the same semantics as an auto specifier together with a hint to the implementation that the object so declared will be heavily used. [Note: the hint can be ignored and in most implementations it will be ignored if the address of the object is taken. ?end note]