[PATCH] D81420: Fix size for _ExtInt types with builtins
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 10 20:30:11 PDT 2020
rjmccall added inline comments.
================
Comment at: clang/test/Sema/builtins-overflow.c:39
+ _ExtInt(129) result;
+ _Bool status = __builtin_mul_overflow(x, y, &result); // expected-error {{signed _ExtInt of bit sizes greater than 128 not supported}}
+ }
----------------
jtmott-intel wrote:
> erichkeane wrote:
> > As @rjmccall said, I'd suggest the new message anyway that mentions the builtin, otherwise this would be confusing for me. Something like:
> >
> > signed argument to __builtin_mul_overflow must have a bitwidth of less than or equal to 128.
> Updated message to something halfway between your and John's suggestions. Current result:
>
> test.c:5:43: error: __builtin_mul_overflow does not support signed _ExtInt operands of more than 128 bits
> _Bool status = __builtin_mul_overflow(x, y, &result);
> ^
> 1 error generated.
>
>
That looks great to me, thanks.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81420/new/
https://reviews.llvm.org/D81420
More information about the cfe-commits
mailing list