aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-09-20 12:52:54 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-09-20 12:52:54 -0400
commit3c41c2d84b8de5a95a322a3f0d8424adf6df8667 (patch)
tree0a0722e68311711a6b9dafafa3c713184cd13306 /src/tokenizer.cpp
parent32c51e015674af346aae1c3f40fed9ef098a6693 (diff)
parentc4a54377e3f07bbd2f9c54c1962c7941792c2c1f (diff)
downloadzig-3c41c2d84b8de5a95a322a3f0d8424adf6df8667.tar.gz
zig-3c41c2d84b8de5a95a322a3f0d8424adf6df8667.zip
Merge branch 'master' into c-to-zig
Diffstat (limited to 'src/tokenizer.cpp')
-rw-r--r--src/tokenizer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp
index c0c78c15f9..a7820678de 100644
--- a/src/tokenizer.cpp
+++ b/src/tokenizer.cpp
@@ -234,7 +234,7 @@ struct Tokenize {
BigInt significand;
};
-__attribute__ ((format (printf, 2, 3)))
+ATTRIBUTE_PRINTF(2, 3)
static void tokenize_error(Tokenize *t, const char *format, ...) {
t->state = TokenizeStateError;
@@ -331,7 +331,7 @@ static void end_float_token(Tokenize *t) {
if (t->radix == 10) {
zig_panic("TODO: decimal floats");
} else {
- int significand_magnitude_in_bin = __builtin_clzll(1) - __builtin_clzll(significand);
+ int significand_magnitude_in_bin = clzll(1) - clzll(significand);
t->exponent_in_bin_or_dec += significand_magnitude_in_bin;
if (!(-1022 <= t->exponent_in_bin_or_dec && t->exponent_in_bin_or_dec <= 1023)) {
t->cur_tok->data.float_lit.overflow = true;