[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks
From: |
Ziyao |
Subject: |
Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks |
Date: |
Tue, 12 Jul 2022 06:57:41 +0800 |
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
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, (continued)
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, Ziyao, 2022/07/11
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, Vincent Lefevre, 2022/07/11
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, Vincent Lefevre, 2022/07/12
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, Ziyao, 2022/07/13
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, grischka, 2022/07/13
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, Ziyao, 2022/07/13
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, grischka, 2022/07/15
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, Vincent Lefevre, 2022/07/13
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, grischka, 2022/07/13
- Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, Vincent Lefevre, 2022/07/13
Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks,
Ziyao <=
Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, Vincent Lefevre, 2022/07/12
Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, Christian JULLIEN, 2022/07/16
Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks, Christian JULLIEN, 2022/07/19