On Wed, Nov 26, 2014 at 09:41:16AM +0800, Chen Gang wrote: > On 11/26/14 8:31, Joseph Myers wrote: > > On Wed, 26 Nov 2014, Chen Gang wrote: > > > >> + gcc_assert (wi::fits_to_tree_p (value, char_type_node) > >> + || wi::fits_to_tree_p (value, short_integer_type_node) > >> + || wi::fits_to_tree_p (value, integer_type_node) > >> + || wi::fits_to_tree_p (value, long_integer_type_node) > >> + || wi::fits_to_tree_p (value, long_long_integer_type_node)); > > > > It doesn't make sense to check for char or short, since you can't write a > > constant of one of those types. And it doesn't make sense to check for > > int or long when checking for long long, as the ranges of int and long are > > subsets of that of long long. So just check long long here. > > > >> + buf = (char *) alloca (strlen (macro) + vlen + extra); > >> + > >> + sprintf (buf, "%s=%s"HOST_WIDE_INT_PRINT_DEC"%s%s",
Oh, and please use spaces around HOST_WIDE_INT_PRINT_DEC etc., with C++11 user defined literals it is always better to have whitespace in there. Jakub