This is the mail archive of the gcc@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]

Re: pragma warnings


Richard Earnshaw writes:
> static const char rscid[]  __attribute__((unused)) = "$id:$";

Gcc -Wall won't emit an unused variable warning even without the
__attribute__((unused)).  I.e.,

static const char rcsid[] = "$Id$";

That's the only combination of static, const, char, *, and [] that
I've found that doesn't the emit the warning, so I've always assumed
it to be a deliberate feature.  At least, I hope it is, since we use
that form in all of our code for $Id$.

-- 
Sudish Joseph                                          MindSpring Enterprises


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