On Thu, Nov 20, 2008 at 07:42:59PM +0100, Masha Rabinovich wrote: > main ? 0 : 1, // function pointer is always true
Done. > (int)main + (int)1e9, // be sure the result is above 1.000.000.000 I removed the error message again. It was wrong in several ways. There is no need for the expression to evaluate to a value > 1000000000. (int)main may be negative. Actually I'm not convinced that these two casts must be supported outside of functions. Section 6.6 in C99 draft N869 does not talk about casting address constants to integers. It does allow implemetations to accept other constant expressions, though. > (int)main / 2, // here must be compile-time error, tcc can compile it > sin(1) ? 0 : 1, // here must be compile-time error, tcc can compile it I don't think we should add checks for all variants of invalid code. IMHO the main focus should be on correctly compiling valid code. Otherwise we'll soon have a not so tiny TinyCC. Daniel _______________________________________________ Tinycc-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/tinycc-devel
