#pragma GCC unroll support
Joseph Myers
joseph@codesourcery.com
Fri Jan 30 02:54:00 GMT 2015
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
joseph@codesourcery.com
More information about the Gcc-patches
mailing list