This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR 87347] Prevent segfaults if TYPE_ARG_TYPES is NULL
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin Jambor <mjambor at suse dot cz>, "Joseph S. Myers" <joseph at codesourcery dot com>, Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 25 Sep 2018 17:57:32 +0200
- Subject: Re: [PR 87347] Prevent segfaults if TYPE_ARG_TYPES is NULL
- References: <ri6worahh82.fsf@suse.cz> <20180925090540.GB8250@tucnak> <ri6wor9fuje.fsf@suse.cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Sep 25, 2018 at 05:47:49PM +0200, Martin Jambor wrote:
> > Isn't that bail out too early?
> > I mean most of the warnings that are emitted by the function don't really
> > need TYPE_ARG_TYPES, only the last one does, so can't you just bail out
> > before the last warning?
>
> my reasoning was that if the function is not what I expect it to be, it
> is better not to touch it. On the other hand, I have no problems moving
> this test lower as done in the patch below.
I guess the question is if we then treat it as a builtin or don't.
Anyway, I'd like to defer that decision to the C FE maintainers.
> > Also, the function comment has "gracely", did you mean "gracefully"?
>
> Of course I did, thanks for spotting that.
>
> Bootstrapped and tested on x86_64-linux and aarch64-linux. OK for
> trunk?
Jakub