OSDN Git Service

* c-lex.c (skip_white_space): Just treat CRs as horizontal whitespace.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Sep 2000 17:59:46 +0000 (17:59 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Sep 2000 17:59:46 +0000 (17:59 +0000)
        * dbxout.c (dbxout_symbol_name): Just use DECL_NAME for
        function-local names.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36570 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-lex.c
gcc/dbxout.c

index c44d716..d3203cc 100644 (file)
@@ -1,10 +1,17 @@
+2000-09-22  Jason Merrill  <jason@redhat.com>
+
+       * c-lex.c (skip_white_space): Just treat CRs as horizontal whitespace.
+
+       * dbxout.c (dbxout_symbol_name): Just use DECL_NAME for
+       function-local names.
+
 2000-09-22  Brad Lucier <lucier@math.purdue.edu>
            Mark Mitchell  <mark@codesourcery.com>
 
         * toplev.c (warn_disabled_optimization): Declare new warning flag.
         * flags.h (warn_disabled_optimization): Add it here.
         * gcse.c (gcse_main): Add warning when disabled.
-        * invoke.texi: Document -Wdisabled-optimization
+        * invoke.texi: Document -Wdisabled-optimization.
 
 2000-09-21  Jason Merrill  <jason@redhat.com>
 
index b1f555b..f6dee4d 100644 (file)
@@ -310,8 +310,9 @@ skip_white_space (c)
     {
       switch (c)
        {
-         /* There is no need to process comments, backslash-newline,
-             or \r here.  None can occur in the output of cpp.  */
+         /* There is no need to process comments or backslash-newline
+             here.  None can occur in the output of cpp.  Do handle \r
+            in case someone sent us a .i file.  */
 
        case '\n':
          if (linemode)
@@ -322,12 +323,13 @@ skip_white_space (c)
          c = check_newline ();
          break;
 
+       case '\r':
          /* Per C99, horizontal whitespace is just these four characters.  */
        case ' ':
        case '\t':
        case '\f':
        case '\v':
-           c = getch ();
+         c = getch ();
          break;
 
        case '\\':
@@ -1503,9 +1505,10 @@ c_lex (value)
       case '\t':
       case '\f':
       case '\v':
-         c = getch ();
+       c = getch ();
        break;
 
+      case '\r':
       case '\n':
        c = skip_white_space (c);
       default:
index 1be2025..71c7959 100644 (file)
@@ -2215,11 +2215,19 @@ dbxout_symbol_name (decl, suffix, letter)
      const char *suffix;
      int letter;
 {
-  /* One slight hitch: if this is a VAR_DECL which is a static
-     class member, we must put out the mangled name instead of the
-     DECL_NAME.  Note also that static member (variable) names DO NOT begin
-     with underscores in .stabs directives.  */
-  const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
+  const char *name;
+
+  if (TYPE_P (DECL_CONTEXT (decl)))
+    /* One slight hitch: if this is a VAR_DECL which is a static
+       class member, we must put out the mangled name instead of the
+       DECL_NAME.  Note also that static member (variable) names DO NOT begin
+       with underscores in .stabs directives.  */
+    name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
+  else
+    /* ...but if we're function-local, we don't want to include the junk
+       added by ASM_FORMAT_PRIVATE_NAME.  */
+    name = IDENTIFIER_POINTER (DECL_NAME (decl));
+
   if (name == 0)
     name = "(anon)";
   fprintf (asmfile, "%s \"%s%s:", ASM_STABS_OP, name,