The expressions gdb.parse_and_eval('0xdeadbeaf').cast(gdb.lookup_type('A').pointer()) and gdb.parse_and_eval('(A*)0xdeadbeaf') do not create the same result in gdb 7.2 and current CVS when used inside a member function of type A. The first one results in a pointer-to-A with value 0xdeadbeef, the second results in a parse error (as does plain 'print (A*)0xdeadbeaf') and it looks like 'A' is mis-read as A::A() in this case.
Dup. *** This bug has been marked as a duplicate of bug 8888 ***