This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix to staticp and LABEL_DECL
- To: gcc-patches at gcc dot gnu dot org
- Subject: Fix to staticp and LABEL_DECL
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Wed, 3 May 00 20:49:08 EDT
Wed May 3 13:29:54 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* tree.c (staticp, case LABEL_DECL): New case.
*** tree.c 2000/04/28 20:52:29 1.140
--- tree.c 2000/05/03 17:18:02
*************** staticp (arg)
*** 2443,2456 ****
/* Nested functions aren't static, since taking their address
involves a trampoline. */
! return (decl_function_context (arg) == 0 || DECL_NO_STATIC_CHAIN (arg))
! && ! DECL_NON_ADDR_CONST_P (arg);
case VAR_DECL:
return (TREE_STATIC (arg) || DECL_EXTERNAL (arg))
! && ! DECL_NON_ADDR_CONST_P (arg);
case CONSTRUCTOR:
return TREE_STATIC (arg);
case STRING_CST:
return 1;
--- 2443,2457 ----
/* Nested functions aren't static, since taking their address
involves a trampoline. */
! return (decl_function_context (arg) == 0 || DECL_NO_STATIC_CHAIN (arg))
! && ! DECL_NON_ADDR_CONST_P (arg);
case VAR_DECL:
return (TREE_STATIC (arg) || DECL_EXTERNAL (arg))
! && ! DECL_NON_ADDR_CONST_P (arg);
case CONSTRUCTOR:
return TREE_STATIC (arg);
+ case LABEL_DECL:
case STRING_CST:
return 1;