> > Is my code wrong
> 
> Yes.  You need to define A::x.

Grrr... so stupid! :-)

Yes, you are right. I stumbled that only a few lines generates an error. Yes, 
the compiler optimize them out if the access is direct. With -O3 
it compiles and links without errors also without having const int A::x; 

Thanks for the hint.

Regards!
 Klaus

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Reply via email to