This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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++/9869] New: gdb fails to see non-anonymous union variables


Given the following short piece of code:

#include <stdio.h>

union U {
	U(int x) {
		const int y = x + 5;
		const int z = x + 20;
		int w;
		w = x + 18;
	}
};

int main() {
	U u(0x01940194);
}

when debugging the constructor of the union, I can't do "print y", "print w", 
or "print z". This may have something to do with bug 8642. Note that my gcc 
version is gcc version 4.1.2 20071124 (Red Hat 4.1.2-42), running on CentOS 5.

-- 
           Summary: gdb fails to see non-anonymous union variables
           Product: gdb
           Version: 6.8
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: oribrost at gmail dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=9869

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


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