Subject: Re: Compiler warning levels and sccsid/rcsid
To: None <current-users@NetBSD.ORG>
From: Christos Zoulas <christos@deshaw.com>
List: current-users
Date: 07/26/1995 08:15:12
In article <9507260654.AA06239@kikka.hut.fi> apm@vipunen.hut.fi writes:
>>If you have established you have gcc, you might as well use #ident, so
>>you don't have to "fool" the compiler at all...
>
>Hmm.. one always learns new things. However it seems that #ident does
>nothing on rs6000-aix, hppa-hpux, alpha-osf and i386-linux. Does it
>work on all netbsd architectures? Gcc.info says:
>
>------------------------------------------------------------------------
>   The `#ident' directive is supported for compatibility with certain
>other systems.  It is followed by a line of text.  On some systems, the
>text is copied into a special place in the object file; on most systems,
>the text is ignored and this directive has no effect.  Typically
>`#ident' is only used in header files supplied with those systems where
>it is meaningful.
>------------------------------------------------------------------------
>
>It does seem to work with mips-irix and m68k-lynx (eh - no netbsd
>systems near me right now).
>
>But anyway - the following:
>
>#define ID(s) \
>#ident s
>
>won't work. I don't know of a way to include a preprocessor thingy in
>a macro. Is it possible?
>
>How about -Wno-unused?
>
>

How about recognizing

/*UNUSED*/

or

#pragma unused;

or 

__attribute__ ((unused))

christos