This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Remove 2 dead lines from java_mangle_decl
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Tom Tromey <tromey at redhat dot com>
- Date: Wed, 12 Mar 2008 16:49:41 +0100
- Subject: [PATCH] Remove 2 dead lines from java_mangle_decl
If these two lines were ever executed, GCC would die soon after with an
assertion failure (I created the patch with big context for making this
evident).
Ok?
Paolo
2008-03-12 Paolo Bonzini <bonzini@gnu.org>
* mangle.c (java_mangle_decl): Remove dead code.
Index: mangle.c
===================================================================
*** mangle.c (revision 133143)
--- mangle.c (working copy)
*************** cxx_keyword_p (const char *name, int len
*** 239,254 ****
void
java_mangle_decl (tree decl)
{
- if (TREE_CODE (decl) == RECORD_TYPE)
- mangle_type (decl);
-
/* A copy of the check from the beginning of lhd_set_decl_assembler_name.
Only FUNCTION_DECLs and VAR_DECLs for variables with static storage
duration need a real DECL_ASSEMBLER_NAME. */
gcc_assert (TREE_CODE (decl) == FUNCTION_DECL
|| (TREE_CODE (decl) == VAR_DECL
&& (TREE_STATIC (decl)
|| DECL_EXTERNAL (decl)
|| TREE_PUBLIC (decl))));
/* Mangling only applies to class members. */
--- 232,251 ----