This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix crash with -fdump-ada-spec
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, <dmalcolm at redhat dot com>
- Date: Wed, 21 Aug 2019 21:22:55 +0000
- Subject: Re: Fix crash with -fdump-ada-spec
- Ironport-sdr: xhjC3OhUxAtdAZ0Uiq8PQL91xoaWyOk+EpweYNPgaGLl4IrsQ7l3x+sa+g/y63s0TzAWyryD2d WXSLmJmD0Gu3RTIch6xscJPynxgku3cQc1/+Gkb42P+WQmi9Q/7DI6rTCX42hjl5G/Y1BO3n8/ Sq8i2EqcxPIlzcZV/U2wQKDV2s9/J7admA9at3pRZkH76y+/oXEAbjjal1T6rAF1vWzaZc6UC6 LAjk1wwfMYSgYYHgoXxI2YFleUFvqX4BvtijWvM9ELEfthxyPWNmqP8+t7+WgsJmawVMXGOk7s 4ao=
- Ironport-sdr: 7Oe/0Ls3s97HsySYNnxMs74uKCMxc3U8Yx5GKpXXbo4JAPqTBooX6V5zM81dXNhaa4arRIQRL7 kMvH3Ve000Id2jNnea3xZ79q/O4BuhV4JwIhmiNnMIMisIxfoDGODtV6hIcEwZ/DZShsoDvdMn pDl6r9Mr/niqOUR7TbfkPgpRAXGiFvcp+0f4N4culgH+54b7c4WXV0QhW6ZLYVvHb/xMrfyeF5 WuVAEinhDMoSEYYHEmcrLBp7HCpIkp0dlM6ZkKPJh4b1aGS4vhxCCoSiTN36yKEAAd3PZrHfAo pmw=
- References: <2508992.5cBtdV5qiJ@arcturus.home> <alpine.DEB.2.21.1908211143510.6172@digraph.polyomino.org.uk> <5761687.FT8pahX5vP@arcturus.home>
On Wed, 21 Aug 2019, Eric Botcazou wrote:
> > Rather than checking if the outermost declarator is
> > cdk_function and using its parameters if so, it's necessary to check if
> > the *innermost declarator that isn't cdk_id or cdk_attrs* is cdk_function
> > and use its parameters if so, as that's what actually determines if the
> > declarator for the entity being declared has the form of a function
> > declarator (see how grokdeclarator determines funcdef_syntax).
>
> Thanks for the hint. Tentative patch attached based on it, which certainly
> makes -fdump-ada-spec happy, as witnessed by the dump-ada-spec-15.c change.
>
> Is it something that you would approve for mainline?
This patch is OK.
--
Joseph S. Myers
joseph@codesourcery.com