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

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to