This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/10634] in-class initialization of static data members no longer allowed


------- Additional Comments From bangerth at dealii dot org  2004-05-08 05:32 -------
It should be, but wasn't always. You can find numerous PRs on it not being 
inlined in ?: expressions. This was fixed for 3.4 and maybe even some 
3.3.x release. On the other hand, the compiler has to emit a definition 
in each translation unit since it is of course allowed to take the address 
of such a member variable. 
 
However, even if it were always inlined: putting the definition into a header 
file would be an ODR violation.  
 
W. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10634


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]