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