* support/cpp2/cpplex.c:
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 27 Nov 2006 18:22:21 +0000 (18:22 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 27 Nov 2006 18:22:21 +0000 (18:22 +0000)
  fixed _asm ... _endasm handling bug, introduce with GCC CPP
  synchronization
* support/cpp2/cpplib.c: removed definitions of unused variables

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4488 4a8a32a2-be11-0410-ad9d-d568d2c75423

support/cpp2/cpplex.c
support/cpp2/cpplib.c

index 3a05ece6df59f3d59f79851ff69ee8408b9fddc1..483128bb5da8d4430a5d354a9915e0031fc1f15c 100644 (file)
@@ -279,7 +279,6 @@ skip_asm_block (pfile)
       prev_space = is_space(c);
       c = *buffer->cur++;
 
-    next_char:
       /* FIXME: For speed, create a new character class of characters
         of interest inside block comments.  */
       if (c == '?' || c == '\\')
@@ -299,7 +298,6 @@ skip_asm_block (pfile)
        {
          prev_space = is_space(c);
          handle_newline (pfile);
-         goto next_char;
        }
       else if (c == '\t')
        adjust_column (pfile);
@@ -1586,15 +1584,15 @@ cpp_output_token (token, fp)
          case CPP_CHAR:        left = '\''; right = '\''; tag = '\0'; break;
          case CPP_WCHAR:       left = '\''; right = '\''; tag = 'L';  break;
          case CPP_HEADER_NAME: left = '<';  right = '>';  tag = '\0'; break;
-         default:
+         case CPP_ASM:         left = '\0'; right = '\0'; tag = '\0'; break;
+          default:
            fprintf (stderr, "impossible STRING token %s\n", TOKEN_NAME (token));
            return;
          }
        if (tag) putc (tag, fp);
-       putc (left, fp);
+       if (left) putc (left, fp);
        fwrite (token->val.str.text, 1, token->val.str.len, fp);
-       putc (right, fp);
-      }
+       if (right) putc (right, fp);      }
       break;
 
     case SPELL_NONE:
index 2b43de053945298d9ec466e357019bbeebdd03e8..286c22f634fe62395f8c15c22a627bbf79909ba3 100644 (file)
@@ -1355,8 +1355,6 @@ void
 _cpp_do__Pragma (pfile)
      cpp_reader *pfile;
 {
-  unsigned char *buffer;
-  unsigned int len;
   const cpp_token *string = get__Pragma_string (pfile);
 
   if (string)