This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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




 		 	   		  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]