On Mon, 26 Jan 2015, Mike Stump wrote:

> +  if (!INTEGRAL_TYPE_P (TREE_TYPE (expr))
> +      || TREE_CODE (expr) != INTEGER_CST
> +      || (lunroll = tree_to_shwi (expr)) < 0
> +      || lunroll > USHRT_MAX)
> +    {
> +      c_parser_error (parser, "%<#pragma GCC unroll%> requires a 
> non-negative number");

That error seems misleading for the case where a number above USHRT_MAX is 
passed.

There should also be tests for the error cases.

> +      unroll = (unsigned short)lunroll;

Casts should have spaces in, "(unsigned short) lunroll"; see 
codingconventions.html.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to