mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +08:00
toolchain/ghs: Fix green hills toolchain build Vela MIN_MANT error
"stdio/lib_dtoa_engine.c", line 102: error #166: invalid floating constant if (x < MIN_MANT) ^ "stdio/lib_dtoa_engine.c", line 102: warning #1626-D: concatenation with "(" in macro "PASTE" does not create a valid token if (x < MIN_MANT) ^ "stdio/lib_dtoa_engine.c", line 102: error #109: expression preceding parentheses of apparent call must have (pointer-to-) function type if (x < MIN_MANT) ^ "stdio/lib_dtoa_engine.c", line 107: error #166: invalid floating constant if (y < MAX_MANT) ^ "stdio/lib_dtoa_engine.c", line 107: warning #1626-D: concatenation with "(" in macro "PASTE" does not create a valid token if (y < MAX_MANT) ^ "stdio/lib_dtoa_engine.c", line 107: error #109: expression preceding parentheses of apparent call must have (pointer-to-) function type if (y < MAX_MANT) ^ "stdio/lib_dtoa_engine.c", line 119: error #166: invalid floating constant if (y >= MIN_MANT) ^ "stdio/lib_dtoa_engine.c", line 119: warning #1626-D: concatenation with "(" in macro "PASTE" does not create a valid token if (y >= MIN_MANT) ^ "stdio/lib_dtoa_engine.c", line 119: error #109: expression preceding parentheses of apparent call must have (pointer-to-) function type if (y >= MIN_MANT) ^ "stdio/lib_dtoa_engine.c", line 144: error #166: invalid floating constant if (x >= MAX_MANT) ^ "stdio/lib_dtoa_engine.c", line 144: warning #1626-D: concatenation with "(" in macro "PASTE" does not create a valid token if (x >= MAX_MANT) ^ "stdio/lib_dtoa_engine.c", line 144: error #109: expression preceding parentheses of apparent call must have (pointer-to-) function type if (x >= MAX_MANT) ^ "stdio/lib_dtoa_engine.c", line 153: error #166: invalid floating constant uint64_t decimal = MIN_MANT_INT; ^ "stdio/lib_dtoa_engine.c", line 153: warning #1626-D: concatenation with "(" in macro "PASTE" does not create a valid token uint64_t decimal = MIN_MANT_INT; ^ "stdio/lib_dtoa_engine.c", line 153: error #109: expression preceding parentheses of apparent call must have (pointer-to-) function type uint64_t decimal = MIN_MANT_INT; Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
This commit is contained in:
parent
2ae4ea3f99
commit
681122bc23
1 changed files with 14 additions and 0 deletions
|
@ -51,6 +51,20 @@
|
|||
* by pasting the value of DBL_DIG onto '1e' to
|
||||
*/
|
||||
|
||||
/* Green hills #define DBL_DIG (6) or #define DBL_DIG (15)
|
||||
* we need remove "()" here
|
||||
*/
|
||||
|
||||
#if DBL_DIG == 6
|
||||
# undef DBL_DIG
|
||||
# define DBL_DIG 6
|
||||
#endif
|
||||
|
||||
#if DBL_DIG == 15
|
||||
# undef DBL_DIG
|
||||
# define DBL_DIG 15
|
||||
#endif
|
||||
|
||||
#define PASTE(a) 1e##a
|
||||
#define SUBSTITUTE(a) PASTE(a)
|
||||
#define MIN_MANT (SUBSTITUTE(DBL_DIG))
|
||||
|
|
Loading…
Reference in a new issue