This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix ObjC++ wrt T_U_D changes


This fixes two obvious places so to make the C++ transition 
regression-less.

Bootstrapped and tested on x86_64, applied as obvious.

Richard.

2010-09-27  Richard Guenther  <rguenther@suse.de>

	* objc-act.c (objc_get_class_reference): Use CP_TYPE_CONTEXT.
	(objc_is_global_reference_p): Use DECL_FILE_SCOPE_P.

Index: gcc/objc/objc-act.c
===================================================================
*** gcc/objc/objc-act.c	(revision 164651)
--- gcc/objc/objc-act.c	(working copy)
*************** objc_get_class_reference (tree ident)
*** 2858,2865 ****
  	     : TREE_TYPE (ident));
  
  #ifdef OBJCPLUS
!   if (TYPE_P (ident) && TYPE_CONTEXT (ident)
!       && TYPE_CONTEXT (ident) != global_namespace)
      local_scope = true;
  #endif
  
--- 2858,2865 ----
  	     : TREE_TYPE (ident));
  
  #ifdef OBJCPLUS
!   if (TYPE_P (ident)
!       && CP_TYPE_CONTEXT (ident) != global_namespace)
      local_scope = true;
  #endif
  
*************** objc_is_global_reference_p (tree expr)
*** 3251,3257 ****
    return (TREE_CODE (expr) == INDIRECT_REF || TREE_CODE (expr) == PLUS_EXPR
  	  ? objc_is_global_reference_p (TREE_OPERAND (expr, 0))
  	  : DECL_P (expr)
! 	  ? (!DECL_CONTEXT (expr) || TREE_STATIC (expr))
  	  : 0);
  }
  
--- 3251,3257 ----
    return (TREE_CODE (expr) == INDIRECT_REF || TREE_CODE (expr) == PLUS_EXPR
  	  ? objc_is_global_reference_p (TREE_OPERAND (expr, 0))
  	  : DECL_P (expr)
! 	  ? (DECL_FILE_SCOPE_P (expr) || TREE_STATIC (expr))
  	  : 0);
  }
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]