Declare float type conditionally to not declare them conditionally when they are not used.
Unified · Split
| @@ -23,8 +23,10 @@ · 22 unmodified lines | ||
| 23 | 23 | #ifdef TARGET_DEFS_ONLY |
| 24 | 24 | |
| 25 | 25 | #ifdef TCC_ARM_EABI |
| 26 | +#ifndef TCC_ARM_VFP // Avoid useless warning | |
| 26 | 27 | #define TCC_ARM_VFP |
| 27 | 28 | #endif |
| 29 | +#endif | |
| 28 | 30 | |
| 29 | 31 | /* number of available registers */ |
| 30 | 32 | #ifdef TCC_ARM_VFP |
| @@ -100,8 +102,10 @@ enum { · 69 unmodified lines | ||
| 100 | 102 | //#define FUNC_STRUCT_PARAM_AS_PTR |
| 101 | 103 | |
| 102 | 104 | #if defined(TCC_ARM_EABI) && defined(TCC_ARM_VFP) |
| 105 | +#ifdef NEED_FLOAT_TYPES | |
| 103 | 106 | static CType float_type, double_type, func_float_type, func_double_type; |
| 104 | 107 | #define func_ldouble_type func_double_type |
| 108 | +#endif | |
| 105 | 109 | #else |
| 106 | 110 | #define func_float_type func_old_type |
| 107 | 111 | #define func_double_type func_old_type |
| @@ -18,6 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | +#define NEED_FLOAT_TYPES | |
| 21 | 22 | #include "tcc.h" |
| 22 | 23 | |
| 23 | 24 | /********************************************************/ |