https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109959
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #9)
> +FAIL: c-c++-common/Wrestrict.c -Wc++-compat (test for excess errors)
> Excess errors:
This is just like the builtin-sprintf-warn-23.c xfail; well except there the
warning message was already correct.
Note if we change signed_range in gcc.dg/range.h to:
static inline ptrdiff_t signed_range (ptrdiff_t min, ptrdiff_t max)
{
ptrdiff_t val = signed_value ();
if (val < min || max < val)
__builtin_unreachable();
return val;
}
We get the same warning as we get with this patch. So I am definitely going to
add/change the dg-warning here because that will be the correct fix.