From b3758a1df04ae812362cfe05e72b376ced74c1e1 Mon Sep 17 00:00:00 2001 From: yangsong8 Date: Wed, 26 Feb 2025 19:51:58 +0800 Subject: [PATCH] compiler: redefine float and double when disable float compiling Redefine float and double on devices that do not support floating-point. float ==> int double ==> long Signed-off-by: yangsong8 --- include/nuttx/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index fbc3dd3c08c..63588bb6e24 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -1353,6 +1353,8 @@ # undef CONFIG_HAVE_FLOAT # undef CONFIG_HAVE_DOUBLE # undef CONFIG_HAVE_LONG_DOUBLE +# define float int +# define double long #endif /* Decorators */