[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Maddening g++/gdb interactions
From: |
cmattair |
Subject: |
Maddening g++/gdb interactions |
Date: |
14 Feb 2007 18:17:25 -0800 |
User-agent: |
G2/1.0 |
Several very annoying g++isms I don't understand:
typedef struct FOO { ... } foo;
typedef foo * mmm;
int main(int argc, char **argv)
{
foo **bar = new mmm[3];
}
If I omit the FOO, whatis bar =._29 ** and print *(foo *) bar gives
me
"No symbol "foo" in current context." but if I include the FOO,
whatis bar = foo ** and print *(foo *) bar works.
And
Class A {};
Class B : public A{};
A *ptr = new B();
print *(B*) ptr give a syntax error at 'B*) ptr'.
If they aren't bugs in g++ and/or gdb, how do I work around them.
Both examples are valid C++,
maybe not how you'd write them, but valid. (gdb 6.4, g++ 4.1.0)
tnx
cgm
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Maddening g++/gdb interactions,
cmattair <=