This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

g++ debug info problem




Software versions (-v output);
  g++: 		gcc version 2.9-gnupro-98r1
  gdb:		GNU gdb 4.17
		...
		This GDB was configured as "hppa1.1-hp-hpux10.20".


If you compile the attached program with  g++ and then run gdb against
the program and execute:
	b main
	run
	ptype it.i
	p (MyClass::PrivEnum) 3

The output of 'ptype it.i' should be:
	type = enum MyClass::PrivEnum {white, red, gree, yellow}
but is:
	type = enum {white, red, gree, yellow}

The output of 'p (MyClass::PrivEnum) 3' should be:
	$1 = yellow
but is:
	A syntax error in expression, near `'.

I believe that these problems are due to the debug information emitted
by g++.  The examples work with HP's aCC compiler.

-- Michael Coulter	coulter@cup.hp.com	(408) 447-5391


----------------------------------------------------- source

class MyClass {
  public:
    enum PrivEnum { white, red, gree, yellow };
    PrivEnum i;
};

enum MyEnum { red, green, blue };

int main(void)
{
  MyClass	it;

  it.i = MyClass::red;
  return red + MyClass::red;
}



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