Fix to staticp and LABEL_DECL

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Wed May 3 17:41:00 GMT 2000


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;


More information about the Gcc-patches mailing list