On Mon, Jul 11, 2022 at 05:47:31PM +0200, Domingo Alvarez Duarte wrote:
> Hello Ziyao !
> 
> Although gcc compiles a file containing your example with warnings, I'm not
> sure it's worth try to do the same in TiinyCC the preprocessor probably uses
> TOKENS from the lexer to decide to skip till the end of the initial "#if 0"
> and '"' is not a valid token the error probably come from the lexer that
> found a non terminated string.
> 
For conditional inclusion,C99 document says:
        Only the first group whose control condition evaluates to true
        (nonzero) is processed. If none of the conditions evaluates to true,
        and there is a #else directive, the group controlled by the #else is
        processed; lacking a #else directive, all the groups until the
        #endif are skipped.1
In my understanding,the skipped part should NOT be processed.

Ziyao


_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to