This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch installed to #undef tokens before poisoning them.
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch installed to #undef tokens before poisoning them.
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Sat, 10 Mar 2001 17:38:25 -0500 (EST)
My recent poison patch caused lots of spurious warnings on linux-gnu:
> 235 poisoning existing macro `strdup'
> system.h:597:43: warning: poisoning existing macro "strdup"
Fixed thusly, and installed as "obvious".
--Kaveh
2001-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* system.h (malloc, realloc, calloc, strdup, bzero, bcmp, rindex):
#undef token before poisoning it.
diff -rup orig/egcs-CVS20010309/gcc/system.h egcs-CVS20010309/gcc/system.h
--- orig/egcs-CVS20010309/gcc/system.h Fri Mar 9 23:05:21 2001
+++ egcs-CVS20010309/gcc/system.h Sat Mar 10 17:28:36 2001
@@ -594,10 +594,17 @@ typedef char _Bool;
#if (GCC_VERSION >= 3000)
+#undef malloc
+#undef realloc
+#undef calloc
+#undef strdup
#pragma GCC poison malloc realloc calloc strdup
/* Note: not all uses of `bcopy' and `index' (esp. variable names)
have been eliminated. */
+#undef bzero
+#undef bcmp
+#undef rindex
#pragma GCC poison bzero bcmp rindex
#endif /* GCC >= 3.0 */