aboutsummaryrefslogtreecommitdiff
path: root/boot/lexer.ll
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-08-01 16:05:51 +0200
committerEugen Wissner <belka@caraus.de>2026-08-01 16:05:51 +0200
commit71b3bbb7698b13b42c99a4ca66c27db4a6189ff8 (patch)
tree1fc6ed246ecc0cf561f38ad774a4815ba357ea7b /boot/lexer.ll
parent8539c10542a4be1e1127daea60bf1b1e4c37e092 (diff)
downloadelna-71b3bbb7698b13b42c99a4ca66c27db4a6189ff8.tar.gz
Enforce integral values in slice ranges
Diffstat (limited to 'boot/lexer.ll')
-rw-r--r--boot/lexer.ll8
1 files changed, 4 insertions, 4 deletions
diff --git a/boot/lexer.ll b/boot/lexer.ll
index 89fe85c..ba54433 100644
--- a/boot/lexer.ll
+++ b/boot/lexer.ll
@@ -174,7 +174,7 @@ to {
return yy::parser::make_TRAIT(yytext + 1, this->location);
}
[[:digit:]]+u {
- unsigned long result = strtoul(yytext, NULL, 10);
+ std::uint64_t result = strtoull(yytext, NULL, 10);
if (errno == ERANGE)
{
@@ -186,7 +186,7 @@ to {
}
}
[[:digit:]]+ {
- long result = strtol(yytext, NULL, 10);
+ std::int64_t result = strtoll(yytext, NULL, 10);
if (errno == ERANGE)
{
@@ -198,7 +198,7 @@ to {
}
}
0[x|X]{HIGIT}+ {
- unsigned long result = strtoul(yytext, NULL, 16);
+ std::uint64_t result = strtoull(yytext, NULL, 16);
if (errno == ERANGE)
{
@@ -210,7 +210,7 @@ to {
}
}
0[b|B]{BIGIT}+ {
- unsigned long result = strtoul(yytext, NULL, 2);
+ std::uint64_t result = strtoull(yytext, NULL, 2);
if (errno == ERANGE)
{