This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [PR 9514] Fixing parse error for "pointer to a function pointer"


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


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