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]

Re: ATTRIBUTE_UNUSED => ARG_UNUSED


On Fri, Nov 5, 2010 at 11:48 PM, Jay K <jay.krell@cornell.edu> wrote:
>
>> 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

I think people are more used to ATTRIBUTE_UNUSED syntax, so I'd rather
get rid of ARG_UNUSED
(what's its advantage?)

Richard.

> ?- 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
>
>


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