* toplev.c (check_global_declaration_1): Robustify.
PR c++/24302
* g++.dg/warn/Wunused-12.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105222
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-10-10 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/24277
+ * pt.c (instantiate_decl): Call finish_static_data_member_decl for
+ static data members.
+
2005-10-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
Mark Mitchell <mark@codesourcery.com>
2005-10-10 Mark Mitchell <mark@codesourcery.com>
+ PR c++/24302
+ * g++.dg/warn/Wunused-12.C: New test.
+
PR c++/23437
* g++.dg/template/arg4.C: New test.
--- /dev/null
+// PR c++/24302
+// { dg-options "-Wunused" }
+
+static union
+{
+ unsigned char FLT4ARR[4];
+ float FLT4;
+}; // { dg-warning "used" }
&& ! TREE_USED (decl)
/* The TREE_USED bit for file-scope decls is kept in the identifier,
to handle multiple external decls in different scopes. */
- && ! TREE_USED (DECL_NAME (decl))
+ && ! (DECL_NAME (decl) && TREE_USED (DECL_NAME (decl)))
&& ! DECL_EXTERNAL (decl)
&& ! TREE_PUBLIC (decl)
/* A volatile variable might be used in some non-obvious way. */