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]
Other format: [Raw text]

GCC warnings for unused global variables


  I noticed that GCC 3.3 differs slightly from GCC 3.2 in regards of
unused static variable warning emission. GCC 3.2 used to ignore
unused static constant variables in both C and C++ frontends before, now
it only does that for C++. Unfortunately, this means that the
following common C code snippet now generates a warning: 

#ifndef lint
static const char rcsid[] =
  "$Id: src/dir/file.c 1.12 1999/08/27 23:45:12 me Exp$";
#endif /* not lint */

 I wonder if the old behavior can be restored or a new -W flag can be
introduced to disable unused warning for such variables? The flag should
pretty trivial to implement.

-- 
Alexander Kabaev


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