This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [libiberty] Add ARG_UNUSED as a C++-friendly replacement forATTRIBUTE_UNUSED
- From: Jason Merrill <jason at redhat dot com>
- To: Bernardo Innocenti <bernie at develer dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Andrew Pinski <pinskia at physics dot uc dot edu>, GCC Patches <gcc-patches at gcc dot gnu dot org>, gdb-patches at redhat dot com, binutils at redhat dot com, Ian Lance Taylor <ian at wasabisystems dot com>, DJ Delorie <dj at redhat dot com>
- Date: Tue, 13 Jul 2004 13:11:50 -0400
- Subject: Re: [libiberty] Add ARG_UNUSED as a C++-friendly replacement forATTRIBUTE_UNUSED
- References: <200407120419.i6C4Jq318362@tin.geop.uc.edu><40F3944C.1000502@develer.com> <20040713081153.GA3089@redhat.com><40F39A33.5040706@develer.com>
On Tue, 13 Jul 2004 10:15:47 +0200, Bernardo Innocenti <bernie@develer.com> wrote:
> Richard Henderson wrote:
>> On Tue, Jul 13, 2004 at 09:50:36AM +0200, Bernardo Innocenti wrote:
>>
>>>define ARG_UNUSED(T,N) to "T N").
>>
>>
>> If we do this, I'd prefer
>>
>> T ARG_UNUSED(N)
>>
>> #ifdef __cplusplus
>> # define ARG_UNUSED(N)
>> #elif somegccversion
>> # define ARG_UNUSED(N) N ATTRIBUTE_UNUSED
>> #else
>> # define ARG_UNUSED(N) N
>> #endif
>
> This wouldn't allow us to support g++ < 3.4:
>
> # define ARG_UNUSED(T,N) ATTRIBUTE_UNUSED T N
Huh? rth's definition above supports all C++ compilers just fine.
Jason