Remove unused variables

Declare float type conditionally to not declare them conditionally when
they are not used.
This commit is contained in:
Thomas Preud'homme 2011-05-16 14:54:22 +02:00
parent ee06ef9dd3
commit 66d992d883
2 changed files with 5 additions and 0 deletions

View File

@ -23,8 +23,10 @@
#ifdef TARGET_DEFS_ONLY #ifdef TARGET_DEFS_ONLY
#ifdef TCC_ARM_EABI #ifdef TCC_ARM_EABI
#ifndef TCC_ARM_VFP // Avoid useless warning
#define TCC_ARM_VFP #define TCC_ARM_VFP
#endif #endif
#endif
/* number of available registers */ /* number of available registers */
#ifdef TCC_ARM_VFP #ifdef TCC_ARM_VFP
@ -100,8 +102,10 @@ enum {
//#define FUNC_STRUCT_PARAM_AS_PTR //#define FUNC_STRUCT_PARAM_AS_PTR
#if defined(TCC_ARM_EABI) && defined(TCC_ARM_VFP) #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; static CType float_type, double_type, func_float_type, func_double_type;
#define func_ldouble_type func_double_type #define func_ldouble_type func_double_type
#endif
#else #else
#define func_float_type func_old_type #define func_float_type func_old_type
#define func_double_type func_old_type #define func_double_type func_old_type

View File

@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#define NEED_FLOAT_TYPES
#include "tcc.h" #include "tcc.h"
/********************************************************/ /********************************************************/