This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]