tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Another patch


From: Marcin Deranek
Subject: [Tinycc-devel] Another patch
Date: Wed, 14 Jul 2004 15:06:47 +0200

Hi,

When I was trying to compile some of the things I quite often got the error 
message like this:
invalid preprocessing directive #defineA

When I had a closer look I found out that problem is related to C++ comments. 
When I substituted // comments with /* */ everything was ok.
Here is the patch which fixes that problem: problem only occurs when C++ 
comment lies on buffer edges.
Cheers,

Marcin Deranek

Patch:

--- tcc.c.old   2004-07-14 14:32:13.000000000 +0200
+++ tcc.c       2004-07-14 14:34:08.000000000 +0200
@@ -1810,7 +1810,9 @@
         if (c == '\n' || c == CH_EOF) {
             break;
         } else if (c == '\\') {
-            PEEKC_EOB(c, p);
+            file->buf_ptr = ++p;
+            c = handle_eob();
+            p = file->buf_ptr;
             if (c == '\n') {
                 file->line_num++;
                 PEEKC_EOB(c, p);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]