[LLVMbugs] [Bug 503] [llvm-g++] const variables are not emitted unless they are preceeded by an extern

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Feb 11 22:54:38 PST 2005


sabre at nondot.org changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

------- Additional Comments From sabre at nondot.org  2005-02-12 00:54 -------
This bug is not a bug.  We are actually matching G++'s behavior.  From the C++
spec (

"A name having namespace scope (3.3.5) has internal linkage if it is the name of
 - an object or reference that is explicitly declared const and neither
explicitly declared extern nor previously declared to have external linkage "

This is exactly what we are getting.  The optimizer is just deleting the (often
dead) constant global.


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list