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: Ziyao
Subject: Re: [Tinycc-devel] Bug that TinyCC Analyses Strings inside #if 0 blocks
Date: Tue, 12 Jul 2022 06:56:34 +0800

> while with tcc:
> 
> zira:~> tcc -E err.c
> # 1 "err.c"
> # 1 "<command line>" 1
> # 2 "err.c" 2
> 
> 
> "
> FOO
> "
> "FOO"
> 
> which makes more sense as an extension, IMHO. But tcc doesn't give
> any diagnostic there, and I think that this is incorrect.

It seems that TinyCC parses the first three lines as a string
literature,does't it?

But according to C99 standard,

string-literal:
        " s-char-sequenceopt "
        L" s-char-sequenceopt "
s-char-sequence:
        s-char
        s-char-sequence s-char
s-char:
        any member of the source character set except the double-quote ",
        backslash \, or new-line character
        escape-sequence

New-line character cannot be included in a string literature.

Ziyao




reply via email to

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