tinycc-devel
[Top][All Lists]
Advanced

[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: Domingo Alvarez Duarte
Subject: Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks
Date: Mon, 11 Jul 2022 17:47:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

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.

Cheers !

On 11/7/22 15:57, Ziyao wrote:
Hi list,

When I was compiling Bash with TinyCC,an error occurred.

The simpliest example is like below:

#if 0
"
#if 0
"
#endif
#endif

Code within #if 0 ... end block should be ignored.But this code breaks
TinyCC.TinyCC seems to analyse the string inside the useless code block.

As many use #if 0 blocks as comments,maybe this is valuable to fix.

Tons of thanks for your help

Ziyao


_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel



reply via email to

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