This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Fix ICE-on-invalid with old-style-parameter-declaration and __func__ (PR c/71265)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 25 May 2016 14:51:09 +0000
- Subject: Re: [C PATCH] Fix ICE-on-invalid with old-style-parameter-declaration and __func__ (PR c/71265)
- Authentication-results: sourceware.org; auth=none
- References: <20160525140127 dot GD17920 at redhat dot com>
On Wed, 25 May 2016, Marek Polacek wrote:
> Another ICE on invalid with old-style-parameter-declaration, this time with
> __func__. The problem is in c_make_fname_decl:
>
> if (current_function_decl
> && (!seen_error () || current_function_scope))
> bind (..., current_function_scope, ...)
>
> The condition is wrong; if current_function_scope is null then we must not call
> bind, otherwise we segv. That's what happens here because seen_error () is 0
> at that point. The seen_error() check doesn't make sense to me here, so I
> suggest removing it, so that we never call bind() here with a null scope.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
OK.
--
Joseph S. Myers
joseph@codesourcery.com