aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@armelhome.rsr.lip6.fr>2011-05-16 14:54:22 +0200
committerThomas Preud'homme <robotux@armelhome.rsr.lip6.fr>2011-05-16 15:21:25 +0200
commit66d992d883dd27a890ab3fc4e4de6659eaaaae1a (patch)
tree24906b97d1ffabbe1f0b25da56b5dd8db679a3c6
parentee06ef9dd394f26b11fef078f07c635a02fd95d6 (diff)
downloadtinycc-66d992d883dd27a890ab3fc4e4de6659eaaaae1a.tar.gz
tinycc-66d992d883dd27a890ab3fc4e4de6659eaaaae1a.tar.bz2
Remove unused variables
Declare float type conditionally to not declare them conditionally when they are not used.
-rw-r--r--arm-gen.c4
-rw-r--r--libtcc.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/arm-gen.c b/arm-gen.c
index 81ee221..9e176a5 100644
--- a/arm-gen.c
+++ b/arm-gen.c
@@ -23,8 +23,10 @@
#ifdef TARGET_DEFS_ONLY
#ifdef TCC_ARM_EABI
+#ifndef TCC_ARM_VFP // Avoid useless warning
#define TCC_ARM_VFP
#endif
+#endif
/* number of available registers */
#ifdef TCC_ARM_VFP
@@ -100,8 +102,10 @@ enum {
//#define FUNC_STRUCT_PARAM_AS_PTR
#if defined(TCC_ARM_EABI) && defined(TCC_ARM_VFP)
+#ifdef NEED_FLOAT_TYPES
static CType float_type, double_type, func_float_type, func_double_type;
#define func_ldouble_type func_double_type
+#endif
#else
#define func_float_type func_old_type
#define func_double_type func_old_type
diff --git a/libtcc.c b/libtcc.c
index 5dc7be9..f97336e 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#define NEED_FLOAT_TYPES
#include "tcc.h"
/********************************************************/