mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix checks on float literal exceeding max, and implicit float conversions.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
func void test()
|
||||
{
|
||||
float x = 0x7FFFFFFFFFFF.0p+400; // #error: The value '3.63419e+134' is out of range for 'float', so you need an explicit cast to truncate the value
|
||||
}
|
||||
5
test/test_suite/floats/float_exceeding_size.c3
Normal file
5
test/test_suite/floats/float_exceeding_size.c3
Normal file
@@ -0,0 +1,5 @@
|
||||
func void test()
|
||||
{
|
||||
float x = 0x7FFFFFFFFFFF.0p+40000; // #error: The float value is out of range.
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user