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

Abhijit Halder abhijit.k.halder@gmail.com
Wed Sep 21 08:45:00 GMT 2011


On Mon, Sep 19, 2011 at 8:48 PM, Abhijit Halder
<abhijit.k.halder@gmail.com> wrote:
> 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
>

Hi I have made some changes to fix the PR 9837.

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

	PR wrong parse/9837:
	* c-exp.y (nonempty_typelist): Use typebase instead of type.  Add rule
	to resolve pointers in function arguments.
	(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: 976 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110921/6f4d99a5/attachment.bin>


More information about the Gdb-patches mailing list