This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: 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:48:33 +0000
- Subject: RE: ATTRIBUTE_UNUSED => ARG_UNUSED
- References: <COL101-W43F644CBEE145D9457C39CE64C0@phx.gbl>
> for a in *.h *.c; do perl -pi.bak -e "s/([A-Za-z0-9_]+) ATTRIBUTE_UNUSED/ARG_UNUSED(\1)/" $a; done
eek, careful there, it breaks stuff, e.g. genautomata.c
?- Jay
----------------------------------------
> From: jay.krell
> To: gcc-patches
> Subject: ATTRIBUTE_UNUSED => ARG_UNUSED
> Date: Fri, 5 Nov 2010 22:25:14 +0000
>
>
> 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