[libiberty] Add ARG_UNUSED as a C++-friendly replacement for ATTRIBUTE_UNUSED

Bernardo Innocenti bernie@develer.com
Tue Jul 13 08:05:00 GMT 2004


DJ Delorie wrote:
> This implementation doesn't address K&R style argument lists, although
> that's soon to be a moot point ;-)

Anyway, I think there's no way to get something like this to work:

   foo (a, b, dummy)
     char *a;
     int b;
     ARG_UNUSED (int, dummy);
   {
   }


> I'd also prefer this definition to be right after the ATTRIBUTE_UNUSED
> definition, rather than randomly added to the end of the file.

OK.


> However, I'm not convinced we need this yet.  By the time we require a
> C++ compiler, 3.4.0 will be old enough to require that version.

So we won't be able to bootstrap from third-party C++ compilers?
The ATTRIBUTE_UNUSED macro cannot be made to work with MSVC, CW
or other popular compilers.

Not that I care that much: on any supported host you can always
install an older version of GCC or cross-compile from another host.

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



More information about the Binutils mailing list