Path: utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!ICS.UCI.EDU!rfg From: rfg@ICS.UCI.EDU Newsgroups: gnu.g++.bug Subject: bug 12178901 (1.36.1) - linkage of global const objects Message-ID: <8912171136.aa08237@ICS.UCI.EDU> Date: 17 Dec 89 19:36:06 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 13 // bug 12178901 - linkage of global const objects // What is the `linkage' of const objects in C++? // GCC generates code for the following such that `ci' has // extern linkage, and such that its initial value is 99. // G++ 1.36.1 however optimizes this declaration into nothing. // Thus, if some other file contained `extern const int ci;' // that other file would fail to link. const int ci = 99;