hello, report a bug, my English is not good, hope you understand.

bug info
file: tccpp.c
function: parse_escape_string
line: 2010
------------------------------------------------------


                do {
                    c = *p;
                    if (c &gt;= 'a' &amp;&amp; c <= 'f')
                        c = c - 'a' + 10;
                    else if (c &gt;= 'A' &amp;&amp; c <= 'F')
                        c = c - 'A' + 10;
                    else if (isnum(c))
                        c = c - '0';
----&gt;               else if (i &gt; 0)
                        expect("more hex digits in universal-character-name");
                    else
                        goto add_hex_or_ucn;
                    n = n * 16 + c;
                    p++;
                } while (--i);




it should be


else if (i &gt;= 0)


------------------------------------------------------
the following code can show the problem:


#include <stdio.h&gt;


int main(int argc, const char **argv)
{
    int x = '\x';
    printf("%d\n", x);

    return 0;
}


------------------------------------------------------
in gcc, it should not be compiled??report error like:




main.c: In function ??main??:
main.c:6:13: error: \x used with no following hex digits
     int x = '\x';






------------------------------------------------------
in tcc, it can be compiled. no error!






837806295
837806...@qq.com





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

Reply via email to