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]

[PATCH] Typo + simple code simplification.



This very simple patch corrects a comment typo and simplifies slightly a 
conditionnal.

Boostraped without regression on x86 on the mainline (no regression 
at all for c,c++,objc. For fortran I see improvements but this cannot 
be related to this patch AFAICT so I guess someone else did it, for libgcj
I cannot say).

gcc/ChangeLog:

2001-03-21  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>

    * varasm.c (data_section): Fix typo in comment.
    (force_data_section): Simplify.

Index: gcc/varasm.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/varasm.c,v
retrieving revision 1.167
diff -c -3 -p -r1.167 varasm.c
*** varasm.c	2001/03/19 23:49:51	1.167
--- varasm.c	2001/03/20 19:00:51
*************** data_section ()
*** 255,261 ****
      }
  }
  /* Tell assembler to ALWAYS switch to data section, in case
!    it's not sure where it it.  */
  
  void
  force_data_section ()
--- 255,261 ----
      }
  }
  /* Tell assembler to ALWAYS switch to data section, in case
!    it's not sure where it is.  */
  
  void
  force_data_section ()
*************** make_decl_rtl (decl, asmspec)
*** 582,588 ****
       tree decl;
       const char *asmspec;
  {
-   int top_level = (DECL_CONTEXT (decl) == NULL_TREE);
    const char *name = 0;
    const char *new_name = 0;
    int reg_number;
--- 582,587 ----
*************** make_decl_rtl (decl, asmspec)
*** 712,725 ****
       whose scope is less than the whole file, unless it's a member
       of a local class (which will already be unambiguous).
       Concatenate a distinguishing number.  */
!   if (!top_level && !TREE_PUBLIC (decl)
!       && ! (DECL_CONTEXT (decl) && TYPE_P (DECL_CONTEXT (decl)))
!       && asmspec == 0)
      {
!       char *label;
!       ASM_FORMAT_PRIVATE_NAME (label, name, var_labelno);
        var_labelno++;
-       new_name = label;
      }
  
    /* When -fprefix-function-name is used, the functions
--- 711,721 ----
       whose scope is less than the whole file, unless it's a member
       of a local class (which will already be unambiguous).
       Concatenate a distinguishing number.  */
!   if (DECL_CONTEXT (decl) && !TREE_PUBLIC (decl)
!       && !TYPE_P (DECL_CONTEXT (decl)) && asmspec == 0)
      {
!       ASM_FORMAT_PRIVATE_NAME (new_name, name, var_labelno);
        var_labelno++;
      }
  
    /* When -fprefix-function-name is used, the functions

 --------------------------------------------------------------------
 Theodore Papadopoulo
 Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------



PGP signature


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