[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] [PATCH] Preprocessor: ignore everything after #error
Re: [Tinycc-devel] [PATCH] Preprocessor: ignore everything after #error or #warning
Wed, 26 Sep 2007 01:23:32 -0500
On Monday 24 September 2007 10:39:07 am Marc Andre Tanner wrote:
> There seems to be a problem in the skiping of preprocessor directives,
> tcc attempts to parse the string even after #error or #warning and
> complains when it shouldn't.
> cat > bug.c << EOF
> #if 0
> #warning This doesn't work
> tcc -c bug.c
> bug3.c:4: missing terminating ' character
> gcc -c bug.c
Ah, good catch.
Hmmm... What about #warning as last line of the file with no newline at the
end of the line?
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.