Thank you for fast response!
The test case works well now, but there is a regression:
=====
main()
{
}
void* p = main;
=====
TCC shows a compilation error.
On Thu, Nov 20, 2008 at 12:36 PM, Daniel Glöckner <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 20, 2008 at 08:50:22AM +0100, Masha Rabinovich wrote:
> > int a = 2.0 ? 0 : 1;
> > int b = (_Bool)2.0;
> > int c = !2.0;
> > int d = 2.0;
> > int e = (char)500;
> >
> > int main()
> > {
> > printf("%d %d %d %d %d\n", a, b, c, d, e);
> > }
> >
> > GCC output: 0 1 0 2 -12
> >
> > TCC output: 1 0 1 0 500
>
> Nice example. It triggers three bugs:
> - constants are cast only inside functions
> - '?' does not cast to bool
> - '!' does not cast to bool
>
> See http://repo.or.cz/w/tinycc/daniel.git
>
> The fix for the first bug needs thorough testing before it is ready for
> inclusion.
>
> Daniel
>
>
> _______________________________________________
> Tinycc-devel mailing list
> [email protected]
> http://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel