Hi you all

IMHO, since static initialization must be done with litterals, the expression (-1.0 <0) must be evaluated, hence should fail.
AFAIK it's even done (in that case) before main is called.
Seems to me like a preprocessing stuff.

--ian

Le 21/05/2023 à 23:27, Fred van Kempen via Tinycc-devel a écrit :
> When initializing static variables with the result of float comparisons, tcc errors out. This works fine on clang without warning, therefore I > assume this is a bug. The expression -1.0 < 0 should always evaluate to 1, no?

Since you are taking the result of a numeric expression, which is auto-casted to 'int' type, yes, this should work.

In my opinion, "tiz a bugg!" :)

--Fred


_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
--
İȃɲ ƝᵋᵃʳᶩỾ
--*menea...@gmail.com*
-- Développeur compulsif
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to