[PATCH] Fixing parse error for "pointer to a function pointer"

Abhijit Halder abhijit.k.halder@gmail.com
Mon Sep 19 17:01:00 GMT 2011


Today GDB complains to parse a pointer to a function pointer.

GNU gdb (GDB) 7.3.50.20110916-cvs
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) ptype int(**)()
A syntax error in expression, near `*)()'.
(gdb)

I am sending this patch to fix this issue.  Please review the same.
NB: I am working on the test-cases and will update the patch with the
same very soon.

Regards,
Abhijit Halder
-------------- next part --------------
2011-09-13  Abhijit Halder  <abhijit.k.halder@gmail.com>

	* c-exp.y (direct_abs_decl): Add new rule to resolve pointer(s) to a
	function pointer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb-parse-error.patch
Type: text/x-patch
Size: 484 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110919/963ed911/attachment.bin>


More information about the Gdb-patches mailing list