This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ATTRIBUTE_UNUSED => ARG_UNUSED
- From: Jay K <jay dot krell at cornell dot edu>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 5 Nov 2010 22:25:14 +0000
- Subject: ATTRIBUTE_UNUSED => ARG_UNUSED
ATTRIBUTE_UNUSED => ARG_UNUSED
In 4.5.1, configure -enable-build-with-cxx, with older g++:
diff -u -r1.1.1.1 directives.c
--- directives.c??? 28 May 2010 05:49:44 -0000??? 1.1.1.1
+++ directives.c??? 5 Nov 2010 21:44:04 -0000
@@ -1,3 +1,5 @@
@@ -621,8 +623,8 @@
?/* Undefine a single macro/assertion/whatever.? */
?
?static int
-undefine_macros (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *h,
-??? ??? ?void *data_p ATTRIBUTE_UNUSED)
+undefine_macros (cpp_reader *ARG_UNUSED(pfile), cpp_hashnode *h,
+??? ??? ?void *ARG_UNUSED(data_p))
?{
?? /* Body of _cpp_free_definition inlined here for speed.
????? Macros and assertions no longer have anything to free.? */
j
and so on.
for a in? *.h *.c; do perl -pi.bak -e "s/([A-Za-z0-9_]+) ATTRIBUTE_UNUSED/ARG_UNUSED(\1)/" $a; done
?- Jay