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: [libiberty] Add ARG_UNUSED as a C++-friendly replacement forATTRIBUTE_UNUSED


Jason Merrill wrote:
> 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.

Aha!  I didn't know you could also put an attribute between the
type and the name.

Is the patch OK with the changes requested by RTH and DJ?

-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/


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