On 08/03/2015 07:23 AM, Nicolai Stange wrote:
Hi Tony,
Tony Camuso <tcamuso@xxxxxxxxxx> writes:
Here's one that might be a sparse bug.
/work/linux/fs/bio.i:5368:26: error: Expected ) at end of cast operator
/work/linux/fs/bio.i:5368:26: error: got __int128
Here is the kernel source in include/linux/math64.h that causes the error.
static inline __attribute__((no_instrument_function)) u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift)
{
return (u64)(((unsigned __int128)a * mul) >> shift);
}
This one is probably triggered by running sparse on gcc -E output.
The mul_u64_u32_shr() implementation cited by you is protected by a
#if ... && defined(__SIZEOF_INT128__)
in include/linux/math64.h
__SIZEOF_INT128__ is #define'd by gcc but not by sparse.
The reason for your parsing error messages is probably that
declaration_specifiers() does not eat up the __int128, leaving this one
to cast_expression().
Could you please confirm that you did indeed run sparse on gcc -E
output?
Thank you,
Nicolai
Yes, we are using -E to generate preprocessor output.
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html