mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Deprecate uXX and iXX bit suffixes.
Add experimental LL / ULL suffixes for int128 and uint128 literals.
This commit is contained in:
@@ -10,7 +10,7 @@ $foreach $c : $chars:
|
||||
int $offset = ($c - $from) / BITS;
|
||||
int $rem = ($c - $from) % BITS;
|
||||
uint128 $value = $bitmap[$offset]; // #error: is out of range
|
||||
$value |= 1u128 << $rem;
|
||||
$value |= 1ULL << $rem;
|
||||
$bitmap = $bitmap[:$offset] +++ $value +++ $bitmap[$offset+1..]; // #error: End index out of bounds
|
||||
$endforeach
|
||||
}
|
||||
@@ -2,13 +2,13 @@ module foo;
|
||||
|
||||
fn void a()
|
||||
{
|
||||
$typeof(9146744073709551615i64) ef;
|
||||
$typeof(9146744073709551615L) ef;
|
||||
int fffx = ef; // #error: 'long'
|
||||
}
|
||||
|
||||
fn void b()
|
||||
{
|
||||
$typeof(9223372036854775809u64) ef;
|
||||
$typeof(9223372036854775809UL) ef;
|
||||
int fffx = ef; // #error: 'ulong'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user