mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Pick double / long double depending on availability.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#if LONG_DOUBLE
|
||||
typedef long double Real;
|
||||
#else
|
||||
typedef double real;
|
||||
typedef double Real;
|
||||
#endif
|
||||
|
||||
#define MAX_ARRAYINDEX INT64_MAX
|
||||
|
||||
@@ -431,7 +431,7 @@ static inline bool scan_hex(Lexer *lexer)
|
||||
#if LONG_DOUBLE
|
||||
Real fval = strtold(lexer->lexing_start, &end);
|
||||
#else
|
||||
real fval = strtod(lexer->lexing_start, &end);
|
||||
Real fval = strtod(lexer->lexing_start, &end);
|
||||
#endif
|
||||
if (errno == ERANGE)
|
||||
{
|
||||
@@ -499,7 +499,7 @@ static inline bool scan_dec(Lexer *lexer)
|
||||
#if LONG_DOUBLE
|
||||
Real fval = strtold(lexer->lexing_start, &end);
|
||||
#else
|
||||
real fval = strtod(lexer->lexing_start, &end);
|
||||
Real fval = strtod(lexer->lexing_start, &end);
|
||||
#endif
|
||||
if (end != lexer->current)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user