Hi
a bunch of minor comments, first:
1- What happens with make check-debug? I suppose the debug-mode checks
trigger before the check in normal code, and the testcase doesn't pass.
Maybe for this kind of work you need a // { dg-require-normal-mode "" }
2- Something sound weird with debug-mode which doesn't throw, just
errors out, and the new check in normal-mode which throws. If there are
other reasons to not throw, per Jakub's comment, I would support the idea.
2- Make sure to have the test variable in the testcases.
3- We definitely need a comment explaining *who* provided _M_range_check
4- Maybe I'm misremembering, sorry in case, but Isn't:
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
the same as:
#if _FORTIFY_SOURCE > 0
?
Thanks,
Paolo.