2011-01-15 01:15 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
* do not inherit in macrocompiler -z compile time switch when -kc is
also used
* harbour/src/common/expropt2.c
* disable logical expression optimization (reduction) in macrocompiler
when -kc compile time switch is used.
* harbour/config/beos/gcc.mk
* harbour/config/qnx/gcc.mk
* harbour/config/bsd/gcc.mk
* harbour/config/wce/mingwarm.mk
* harbour/config/vxworks/gcc.mk
* harbour/config/hpux/gcc.mk
* harbour/config/darwin/gcc.mk
* harbour/config/dos/djgpp.mk
* harbour/config/win/mingw.mk
* harbour/config/linux/gcc.mk
* harbour/config/cygwin/gcc.mk
* harbour/config/symbian/gcc.mk
* harbour/config/os2/gcc.mk
* harbour/config/sunos/gcc.mk
* harbour/utils/hbmk2/hbmk2.prg
* enable some important warnings in GCC builds using -W<name>... instead
of -Wall and -Wno-<name>... for warning level set to low.
It should help in backward compatibility with some older GCC versions.
This commit is contained in:
@@ -16,6 +16,34 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-01-15 01:15 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbcomp.h
|
||||
* do not inherit in macrocompiler -z compile time switch when -kc is
|
||||
also used
|
||||
|
||||
* harbour/src/common/expropt2.c
|
||||
* disable logical expression optimization (reduction) in macrocompiler
|
||||
when -kc compile time switch is used.
|
||||
|
||||
* harbour/config/beos/gcc.mk
|
||||
* harbour/config/qnx/gcc.mk
|
||||
* harbour/config/bsd/gcc.mk
|
||||
* harbour/config/wce/mingwarm.mk
|
||||
* harbour/config/vxworks/gcc.mk
|
||||
* harbour/config/hpux/gcc.mk
|
||||
* harbour/config/darwin/gcc.mk
|
||||
* harbour/config/dos/djgpp.mk
|
||||
* harbour/config/win/mingw.mk
|
||||
* harbour/config/linux/gcc.mk
|
||||
* harbour/config/cygwin/gcc.mk
|
||||
* harbour/config/symbian/gcc.mk
|
||||
* harbour/config/os2/gcc.mk
|
||||
* harbour/config/sunos/gcc.mk
|
||||
* harbour/utils/hbmk2/hbmk2.prg
|
||||
* enable some important warnings in GCC builds using -W<name>... instead
|
||||
of -Wall and -Wno-<name>... for warning level set to low.
|
||||
It should help in backward compatibility with some older GCC versions.
|
||||
|
||||
2011-01-14 10:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/config/beos/gcc.mk
|
||||
* harbour/config/qnx/gcc.mk
|
||||
|
||||
@@ -23,7 +23,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -25,7 +25,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -21,7 +21,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -31,7 +31,7 @@ CFLAGS += -fno-common
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -22,7 +22,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -27,7 +27,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -25,7 +25,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -30,7 +30,7 @@ endif
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -25,7 +25,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -25,7 +25,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -25,7 +25,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -35,7 +35,7 @@ CFLAGS += -D_C99 -D_HAS_C9X
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -21,7 +21,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -36,7 +36,7 @@ endif
|
||||
ifneq ($(HB_BUILD_WARN),no)
|
||||
CFLAGS += -W -Wall
|
||||
else
|
||||
CFLAGS += -Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main
|
||||
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
||||
endif
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
|
||||
@@ -400,13 +400,16 @@ extern const HB_BYTE hb_comp_pcode_len[];
|
||||
#if defined( HB_MACRO_SUPPORT )
|
||||
# define HB_MACRO_GENFLAGS HB_COMPFLAG_RT_MACRO
|
||||
#elif ! defined( HB_COMMON_SUPPORT )
|
||||
# define HB_MACRO_GENFLAGS ( ( ( HB_BYTE ) HB_COMP_PARAM->supported ) & \
|
||||
( HB_COMPFLAG_HARBOUR | \
|
||||
HB_COMPFLAG_XBASE | \
|
||||
HB_COMPFLAG_SHORTCUTS | \
|
||||
HB_COMPFLAG_ARRSTR | \
|
||||
HB_COMPFLAG_EXTOPT | \
|
||||
HB_COMPFLAG_RT_MACRO ) )
|
||||
# define HB_MACRO_GENFLAGS ( ( ( ( HB_BYTE ) HB_COMP_PARAM->supported ) & \
|
||||
( HB_COMPFLAG_HARBOUR | \
|
||||
HB_COMPFLAG_XBASE | \
|
||||
HB_COMPFLAG_SHORTCUTS | \
|
||||
HB_COMPFLAG_ARRSTR | \
|
||||
HB_COMPFLAG_EXTOPT | \
|
||||
HB_COMPFLAG_RT_MACRO ) ) | \
|
||||
( ( HB_COMP_PARAM->supported & \
|
||||
HB_COMPFLAG_HARBOUR ) == 0 ? \
|
||||
HB_COMPFLAG_SHORTCUTS : 0 ) )
|
||||
#endif
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
@@ -1725,7 +1725,8 @@ HB_EXPR_PTR hb_compExprReduceAnd( HB_EXPR_PTR pSelf, HB_COMP_DECL )
|
||||
}
|
||||
}
|
||||
else if( pRight->ExprType == HB_ET_LOGICAL &&
|
||||
HB_COMP_ISSUPPORTED( HB_COMPFLAG_SHORTCUTS ) )
|
||||
HB_COMP_ISSUPPORTED( HB_COMPFLAG_SHORTCUTS ) &&
|
||||
( HB_COMP_PARAM->mode == HB_MODE_COMPILER || HB_SUPPORT_HARBOUR ) )
|
||||
{
|
||||
if( pRight->value.asLogical )
|
||||
{
|
||||
@@ -1792,7 +1793,8 @@ HB_EXPR_PTR hb_compExprReduceOr( HB_EXPR_PTR pSelf, HB_COMP_DECL )
|
||||
}
|
||||
}
|
||||
else if( pRight->ExprType == HB_ET_LOGICAL &&
|
||||
HB_COMP_ISSUPPORTED( HB_COMPFLAG_SHORTCUTS ) )
|
||||
HB_COMP_ISSUPPORTED( HB_COMPFLAG_SHORTCUTS ) &&
|
||||
( HB_COMP_PARAM->mode == HB_MODE_COMPILER || HB_SUPPORT_HARBOUR ) )
|
||||
{
|
||||
if( pRight->value.asLogical )
|
||||
{
|
||||
|
||||
@@ -3181,7 +3181,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
SWITCH hbmk[ _HBMK_nWARN ]
|
||||
CASE _WARN_MAX ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall -pedantic" ) ; EXIT
|
||||
CASE _WARN_YES ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall" ) ; EXIT
|
||||
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main" ) ; EXIT
|
||||
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat" ) ; EXIT
|
||||
CASE _WARN_NO ; AAdd( hbmk[ _HBMK_aOPTC ], "-w" ) ; EXIT
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
@@ -3427,7 +3427,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
SWITCH hbmk[ _HBMK_nWARN ]
|
||||
CASE _WARN_MAX ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall -pedantic" ) ; EXIT
|
||||
CASE _WARN_YES ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall" ) ; EXIT
|
||||
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main" ) ; EXIT
|
||||
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat" ) ; EXIT
|
||||
CASE _WARN_NO ; AAdd( hbmk[ _HBMK_aOPTC ], "-w" ) ; EXIT
|
||||
ENDSWITCH
|
||||
cOpt_CompC += " {FC}"
|
||||
@@ -3561,7 +3561,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
SWITCH hbmk[ _HBMK_nWARN ]
|
||||
CASE _WARN_MAX ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall -pedantic" ) ; EXIT
|
||||
CASE _WARN_YES ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall" ) ; EXIT
|
||||
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main" ) ; EXIT
|
||||
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat" ) ; EXIT
|
||||
CASE _WARN_NO ; AAdd( hbmk[ _HBMK_aOPTC ], "-w" ) ; EXIT
|
||||
ENDSWITCH
|
||||
cOpt_CompC += " {FC}"
|
||||
@@ -3669,7 +3669,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
SWITCH hbmk[ _HBMK_nWARN ]
|
||||
CASE _WARN_MAX ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall -pedantic" ) ; EXIT
|
||||
CASE _WARN_YES ; AAdd( hbmk[ _HBMK_aOPTC ], "-W -Wall" ) ; EXIT
|
||||
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wall -Wno-unused -Wno-pointer-sign -Wno-uninitialized -Wno-switch -Wno-strict-overflow -Wno-main" ) ; EXIT
|
||||
CASE _WARN_LOW ; AAdd( hbmk[ _HBMK_aOPTC ], "-Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat" ) ; EXIT
|
||||
CASE _WARN_NO ; AAdd( hbmk[ _HBMK_aOPTC ], "-w" ) ; EXIT
|
||||
ENDSWITCH
|
||||
cOpt_CompC += " {FC}"
|
||||
|
||||
Reference in New Issue
Block a user