tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Preprocessor bug


From: Jun Inoue
Subject: [Tinycc-devel] Preprocessor bug
Date: Thu, 27 Apr 2006 00:00:42 -0700
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

The following program returns 1 while it should return 0.

----------from here----------
#define SQUISH(n) (!!((n) & 0xF))

#define HEX2BIN(n) (SQUISH(n))

#define FLAGS(f) HEX2BIN(0x##f##U)

int
main ()
{
    return FLAGS(0);
}
----------to here----------

It properly returns 0 if FLAGS is changed to HEX2BIN or SQUISH, or if
I preprocess the code with GNU cpp.  I can't figure out how to stop
the compilation after the preprocessing phase in tcc.  I have other
things I want to do, so I'm not digging further into this.

This behavior is consistently repeatable with tcc version 0.9.23 on
Debian GNU/Linux sid (unstable) running on a Pentium M.  I tried both
Debian's binary package and the tarball put up at tinycc.org.




reply via email to

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