This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: _FORTIFY_SOURCE for std::vector
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 01 Jun 2012 13:42:15 +0200
- Subject: Re: _FORTIFY_SOURCE for std::vector
- References: <4FC8A0DE.7030104@redhat.com>
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.