]> git.gag.com Git - fw/sdcc/commitdiff
* support\cpp2\cpplex.c: fixed for SDCPP:
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 31 Oct 2003 12:30:40 +0000 (12:30 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 31 Oct 2003 12:30:40 +0000 (12:30 +0000)
  comments(when executed with -C option) and _asm blocks
  were included even if they where in skipped #if block.
  Applied solution from GCC cpp 3.3.2

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

ChangeLog
support/cpp2/cpplex.c

index eaae861c5d3610eb3d42a7048c7ce1fa57245672..5007681f8025b1bdd422d53d1acc3c457fe64091 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-10-31  Borut Razem <borut.razem@siol.net>
+
+       * support\cpp2\cpplex.c: fixed for SDCPP:
+         comments(when executed with -C option) and _asm blocks
+         were included even if they where in skipped #if block.
+         Applied solution from GCC cpp 3.3.2
+
 2003-10-31  Borut Razem <borut.razem@siol.net>
 
        * src/SDCC.lex: sdcc now understands both formats:
index c174648cd366b79ff2d42595fdfd28bfe1a560b8..9fbe6e6d4d1c9f99fe7c8828fc73081362b92d9e 100644 (file)
@@ -1066,8 +1066,6 @@ _cpp_lex_token (pfile, result)
           skip_asm_block (pfile);
           /* Save the _asm block as a token in its own right.  */
           save_asm (pfile, result, comment_start);
-          /* Don't do MI optimisation.  */
-          return;
         }
       /* Convert named operators to their proper types.  */
       else if (result->val.node->flags & NODE_OPERATOR)
@@ -1135,8 +1133,11 @@ _cpp_lex_token (pfile, result)
 
       /* Save the comment as a token in its own right.  */
       save_comment (pfile, result, comment_start);
-      /* Don't do MI optimisation.  */
-      return;
+      /* fixed for SDCPP:
+         when executed with -C option, comments
+         were included even if they where in skipped #if block.
+         Applied solution from GCC cpp 3.3.2 */
+      break;
 
     case '<':
       if (pfile->state.angled_headers)