The gcc-specific part now. Bootstrap+testsuite on x86_64-unknown-linux-gnu together with the libiberty patch (well, libgomp.graphite/force-parallel-4.c failed, but that randomly happens).

2013-10-12  Marc Glisse  <marc.gli...@inria.fr>

        PR tree-optimization/58689
        * system.h (concat, reconcat, choose_temp_base, xmalloc, xrealloc,
        xcalloc, xstrdup, xstrndup, xmemdup, pex_init): Mark with attribute
        returns_nonnull.


--
Marc Glisse
Index: gcc/system.h
===================================================================
--- gcc/system.h        (revision 203463)
+++ gcc/system.h        (working copy)
@@ -645,20 +645,40 @@ extern int vsnprintf (char *, size_t, co
 #endif
 
 /* Do not introduce a gmp.h dependency on the build system.  */
 #ifndef GENERATOR_FILE
 #include <gmp.h>
 #endif
 
 /* Get libiberty declarations.  */
 #include "libiberty.h"
 
+/* Add attributes that libiberty doesn't want to add globally.  */
+#if GCC_VERSION >= 4009
+# ifdef __cplusplus
+extern "C" {
+# endif
+__typeof (concat) concat ATTRIBUTE_RETURNS_NONNULL;
+__typeof (reconcat) reconcat ATTRIBUTE_RETURNS_NONNULL;
+__typeof (choose_temp_base) choose_temp_base ATTRIBUTE_RETURNS_NONNULL;
+__typeof (xmalloc) xmalloc ATTRIBUTE_RETURNS_NONNULL;
+__typeof (xrealloc) xrealloc ATTRIBUTE_RETURNS_NONNULL;
+__typeof (xcalloc) xcalloc ATTRIBUTE_RETURNS_NONNULL;
+__typeof (xstrdup) xstrdup ATTRIBUTE_RETURNS_NONNULL;
+__typeof (xstrndup) xstrndup ATTRIBUTE_RETURNS_NONNULL;
+__typeof (xmemdup) xmemdup ATTRIBUTE_RETURNS_NONNULL;
+__typeof (pex_init) pex_init ATTRIBUTE_RETURNS_NONNULL;
+# ifdef __cplusplus
+}
+# endif
+#endif
+
 #undef FFS  /* Some systems predefine this symbol; don't let it interfere.  */
 #undef FLOAT /* Likewise.  */
 #undef ABS /* Likewise.  */
 #undef PC /* Likewise.  */
 
 /* Provide a default for the HOST_BIT_BUCKET.
    This suffices for POSIX-like hosts.  */
 
 #ifndef HOST_BIT_BUCKET
 #define HOST_BIT_BUCKET "/dev/null"

Reply via email to