[LLVMbugs] [Bug 503] NEW: [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 16:05:04 PST 2005


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=503

           Summary: [llvm-g++] const variables are not emitted unless they
                    are preceeded by an extern
           Product: tools
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-g++
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org


The following .cpp file does not produce any code:

---
struct foo { int X, Y; };
const foo X = { 1, 2 };
---

It should emit a global for X.  Allowing other TU's to use 'extern const foo X;'

Note that if we add a 'extern const foo X;' before the definition of X, we do
emit the global, strangely enough.

-Chris



------- 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