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]

C++ PATCH: Fix template statics


Fixes g++.pt/static11.C with the old ABI; static data members do not
satisfy DECL_NAMESPACE_SCOPE_P, but do need a mangled guard variable.

2000-09-20  Jason Merrill  <jason@redhat.com>

	* decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.

*** decl2.c.~1~	Sun Sep 17 15:48:43 2000
--- decl2.c	Wed Sep 20 06:43:02 2000
*************** get_guard (decl)
*** 2868,2874 ****
  
    /* For a local variable, under the old ABI, we do not try to get a
       unique mangled name for the DECL.  */
!   if (!flag_new_abi && !DECL_NAMESPACE_SCOPE_P (decl))
      {
        guard = get_temp_name (integer_type_node);
        cp_finish_decl (guard, NULL_TREE, NULL_TREE, 0);
--- 2868,2874 ----
  
    /* For a local variable, under the old ABI, we do not try to get a
       unique mangled name for the DECL.  */
!   if (!flag_new_abi && DECL_FUNCTION_SCOPE_P (decl))
      {
        guard = get_temp_name (integer_type_node);
        cp_finish_decl (guard, NULL_TREE, NULL_TREE, 0);

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