This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [PR 9514] Fixing parse error for "pointer to a function pointer"
- From: Keith Seitz <keiths at redhat dot com>
- To: Abhijit Halder <abhijit dot k dot halder at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 18 Oct 2011 12:31:08 -0700
- Subject: Re: [PATCH] [PR 9514] Fixing parse error for "pointer to a function pointer"
- References: <CAOhZP9yYEXV_rFEGQHPACeeYxiqAwYw4XjfNeozu18OWLFu24A@mail.gmail.com> <CAOhZP9yqbRXOd6rP2v1mpjszvRhycAOP9JwJXa+SQNz7tF5BRQ@mail.gmail.com> <201109291210.01022.pedro@codesourcery.com> <CAOhZP9xuEcQ97hb_DXK_ri0iR6pj_PDvtoJqCMPXMVpRcN+ZSg@mail.gmail.com> <m339fauipv.fsf@fleche.redhat.com> <4E8E18FC.4030705@redhat.com> <CAOhZP9wSdVs8AbsjpKNpnFkPLV8ixOQ_JF7LmgoTOpSV_E9JRQ@mail.gmail.com>
On 10/17/2011 03:59 AM, Abhijit Halder wrote:
+FAIL: gdb.base/code-expr.exp: (int ** @code)
+FAIL: gdb.base/cvexpr.exp: (int ** const)
With latest CVS code the patch has no regression:
I still see those as regressions (gdb 7.3.50.20111018-cvs):
$ diff -p testsuite/gdb.sum.0 testsuite/gdb.sum | grep "int \*\*"
PASS: gdb.base/code-expr.exp: (@code int **)
! PASS: gdb.base/code-expr.exp: (int ** @code)
PASS: gdb.base/code-expr.exp: (@code int **)
! FAIL: gdb.base/code-expr.exp: (int ** @code)
PASS: gdb.base/cvexpr.exp: (const int **)
! PASS: gdb.base/cvexpr.exp: (int ** const)
PASS: gdb.base/cvexpr.exp: (const int **)
! FAIL: gdb.base/cvexpr.exp: (int ** const)
Do I have an outdated version of the patch?
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index b850179..60004f3 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -944,6 +944,8 @@ abs_decl: '*'
{ push_type (tp_pointer); $$ = 0; }
| '*' abs_decl
{ push_type (tp_pointer); $$ = $2; }
+ | abs_decl '*'
+ { push_type (tp_pointer); $$ = $1; }
| '&'
{ push_type (tp_reference); $$ = 0; }
| '&' abs_decl
Am I missing something else?
Keith