gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: [PATCH] Fix PR c++/19989 (4.0/4.1 regression)

Subject: Re: [PATCH] Fix PR c++/19989 4.0/4.1 regression
From: Mark Mitchell
Date: Wed, 02 Nov 2005 23:06:23 -0800
Josh Conner wrote:

> +     if (integer_zerop (max) && !(complain & tf_error))
>         {
> -         /* Still allow an explicit array of size zero.  */
> -         if (pedantic)
> -           pedwarn ("creating array with size zero");
> +         /* We must fail if performing argument deduction (as
> +            indicated by the state of complain), so that
> +            another substitution can be found.  */
> +         return error_mark_node;
>         }

The GNU coding standards are that if there is only one dependent
statement, then there should be no braces.  So, just:

  if (...)
    /* Comment...  */
    return error_mark_node;

Make that change (no need to fully retest; just run your test cases to
make sure they still work) and check in.

Thanks,

-- 
Mark Mitchell
CodeSourcery, LLC
mark@xxxxxxxxxxxxxxxx
(916) 791-8304

<Prev in Thread] Current Thread [Next in Thread>