2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c/17178, PR c/17820
* c-decl.c (pop_scope): Do not warn about unused static
variables as they warned in the middle-end.
2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c/17178
* gcc.dg/unused-4.c: Adjust to be correct.
PR c/17820
* gcc.dg/unused-7.c: New test.
From-SVN: r88467
+2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR c/17178, PR c/17820
+ * c-decl.c (pop_scope): Do not warn about unused static
+ variables as they warned in the middle-end.
+
2004-10-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* builtins.c (expand_builtin_memcpy): Delete duplicate code
&& !DECL_IN_SYSTEM_HEADER (p)
&& DECL_NAME (p)
&& !DECL_ARTIFICIAL (p)
- && (scope != file_scope
- || (TREE_STATIC (p) && !TREE_PUBLIC (p)
- && !TREE_THIS_VOLATILE (p)))
- && scope != external_scope)
+ && scope != file_scope
+ && scope != external_scope)
warning ("%Junused variable %qD", p, p);
if (b->inner_comp)
+2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR c/17178
+ * gcc.dg/unused-4.c: Adjust to be correct.
+
+ PR c/17820
+ * gcc.dg/unused-7.c: New test.
+
2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17797
/* { dg-do compile } */
/* { dg-options "-Wunused -O3" } */
-static const int i = 0; /* { dg-warning "unused variable" } */
+static const int i = 0;
static void f() { } /* { dg-warning "defined but not used" } */
static inline void g() { }
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Wunused-parameter" } */
+
+static int a = 10; /* { dg-warning "defined but not used" } */
+