GCC does not emit debug info for variable 'j' in following example, when stabs 
debugging format is 
used.

const int j = 4;
int foo ()
{
        return j + 1;
}

int main()
{
        int i;
        i = foo();
        return i;
}

-- 
           Summary: [C++] debug info omitted for global variables
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dpatel at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to