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: Bernardo Innocenti <bernie at develer dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, GCC Patches <gcc-patches at gcc dot gnu dot org>, gdb-patches at sources dot redhat dot com, binutils at sources dot redhat dot com, Ian Lance Taylor <ian at wasabisystems dot com>,DJ Delorie <dj at redhat dot com>
- Date: Tue, 13 Jul 2004 10:15:47 +0200
- Subject: Re: [libiberty] Add ARG_UNUSED as a C++-friendly replacement forATTRIBUTE_UNUSED
- Organization: Develer S.r.l.
- References: <200407120419.i6C4Jq318362@tin.geop.uc.edu> <40F3944C.1000502@develer.com> <20040713081153.GA3089@redhat.com>
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
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/