tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] TCC preprocessor bug


From: Fabrice Bellard
Subject: Re: [Tinycc-devel] TCC preprocessor bug
Date: Thu, 23 Dec 2004 23:18:12 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Szabó Péter wrote:
Dear Developers,

The attached source code (derived from an IOCCC entry) compiles fine in GCC 2.95 and GCC 3.0, but fails with TCC:

    $ gcc -ansi -W -Wall ~/pts/fanf1.c
    /home/guests/pts/pts/fanf1.c: In function `b':
    /home/guests/pts/pts/fanf1.c:640: warning: unused parameter `c'
    /home/guests/pts/pts/fanf1.c: In function `d':
    /home/guests/pts/pts/fanf1.c:640: warning: unused parameter `c'
    /home/guests/pts/pts/fanf1.c: At top level:
/home/guests/pts/pts/fanf1.c:644: warning: `main' takes only zero or two arguments
    /home/guests/pts/pts/fanf1.c: In function `main':
    /home/guests/pts/pts/fanf1.c:644: warning: unused parameter `c'
    $ gcc -v
    Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
    gcc version 2.95.4 20011002 (Debian prerelease)
    $ tcc -v
    tcc version 0.9.22
    $ tcc ~/pts/fanf1.c
/home/guests/pts/pts/fanf1.c:636: warning: assignment makes pointer from integer without a cast
    /home/guests/pts/pts/fanf1.c:680: field not found

I think the bug is in the TCC preprocessor, because TCC can compile the program after running `gcc -E' on it.

It may be related to the preprocessor bug mentionned in the first entry of the TODO. The fix is not easy to make, but it would also fix some issues when compiling the Linux kernel...

Fabrice.





reply via email to

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