On 10/18/2010 01:53 PM, Pádraig Brady wrote:
On 17/10/10 20:58, Bruno Haible wrote:
+/* When, on glibc systems, -D_FORTIFY_SOURCE=1 or -D_FORTIFY_SOURCE=2 is used,
+   enable extra bounds checking, based on the object bounds analysis done by
+   GCC.
+   The user can disable this bounds checking by defining _GL_NO_FORTIFY.
+   __attribute__ __warning__ requires GCC>= 4.3.
+   __builtin_object_size requires GCC>= 4.1.
+   __always_inline__ requires GCC>= 3.2.  */
+#if __USE_FORTIFY_LEVEL>  0&&  !defined _GL_NO_FORTIFY&&  __GNUC_PREREQ (4, 3)

How about adding support for older compilers as follows.
This might also be a stepping stone for people trying
to understand the more thorough version?

I don't think it's worthwhile, honestly. Maybe it is worthwhile however to enable the checks for 4.1 with the sole exception of the link-time warning. For 4.1 and 4.2, leave out the aliasing of inttostr_chk_warn so that it remains undefined and linking fails.

Paolo

Reply via email to