mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/24302 (anonymous global union segfault with g++ 3.4.x)
PR c++/24302 * toplev.c (check_global_declaration_1): Robustify. PR c++/24302 * g++.dg/warn/Wunused-12.C: New test. From-SVN: r105222
This commit is contained in:
parent
18c75543a8
commit
eb2182e299
|
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2005-10-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
|
||||||
Mark Mitchell <mark@codesourcery.com>
|
Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
2005-10-10 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
|
PR c++/23437
|
||||||
* g++.dg/template/arg4.C: New test.
|
* g++.dg/template/arg4.C: New test.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
// PR c++/24302
|
||||||
|
// { dg-options "-Wunused" }
|
||||||
|
|
||||||
|
static union
|
||||||
|
{
|
||||||
|
unsigned char FLT4ARR[4];
|
||||||
|
float FLT4;
|
||||||
|
}; // { dg-warning "used" }
|
||||||
|
|
@ -836,7 +836,7 @@ check_global_declaration_1 (tree decl)
|
||||||
&& ! TREE_USED (decl)
|
&& ! TREE_USED (decl)
|
||||||
/* The TREE_USED bit for file-scope decls is kept in the identifier,
|
/* The TREE_USED bit for file-scope decls is kept in the identifier,
|
||||||
to handle multiple external decls in different scopes. */
|
to handle multiple external decls in different scopes. */
|
||||||
&& ! TREE_USED (DECL_NAME (decl))
|
&& ! (DECL_NAME (decl) && TREE_USED (DECL_NAME (decl)))
|
||||||
&& ! DECL_EXTERNAL (decl)
|
&& ! DECL_EXTERNAL (decl)
|
||||||
&& ! TREE_PUBLIC (decl)
|
&& ! TREE_PUBLIC (decl)
|
||||||
/* A volatile variable might be used in some non-obvious way. */
|
/* A volatile variable might be used in some non-obvious way. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue