[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
Mon, 24 Sep 2007 22:30:18 -0400
On Mon, Sep 24, 2007 at 05:39:07PM +0200, 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.
An #error (or the non-standard #warning, if you assume it works
similarly to #error) is supposed to contain preprocessing tokens. The
real problem here seems to be that a bare apostrophe can be a valid
preprocessing token according to C99, but tcc doesn't seem to have any
way to recognize it as such in preprocess_skip(). I don't have a
better solution, though.