This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)
- From: Marek Polacek <polacek at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 13 Dec 2016 11:52:34 +0100
- Subject: Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)
- Authentication-results: sourceware.org; auth=none
- References: <a0841e6f-f3dc-e8e9-f439-5f11c69c285b@gmail.com>
On Mon, Dec 12, 2016 at 06:36:16PM -0700, Martin Sebor wrote:
> +/* Return true if the type of OP is signed, looking through any casts
> + to an unsigned type. */
> +
> +static bool
> +operand_signed_p (tree op)
> +{
> + bitmap visited = NULL;
> + bool ret = operand_signed_p (op, &visited);
> +
> + if (visited)
> + BITMAP_FREE (visited);
I think you can drop the if before BITMAP_FREE here.
Marek