diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2ba466c746..7ff0b8fe71 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,21 @@ +2000-04-26 20:40 GMT-4 David G. Holm + + * include/hbcomp.h + ! Change hb_comp_iGenCOutput from BOOL to int, because it can have + one of three values, not just TRUE or FALSE. + + * source/compiler/harbour.c + ! Change hb_comp_iGenCOutput from BOOL to int, because it can have + one of three values, not just TRUE or FALSE. + ! Changed 'char * szSize [10];' to 'char szSize [10];' in hb_xgrab() + and hb_xrealloc(). + + * source/compiler/hbpcode + ! Added parentheses around & expressions in comparisons for the + HB_P_PUSHSYMNEAR case due to operator precedence confusion + resulting in compiler warnings. + + 20000426-12:30 GMT-8 Ron Pinkas * harbour/include/hbcomp.h diff --git a/harbour/include/hbcomp.h b/harbour/include/hbcomp.h index fbb180a706..b2fbad787e 100644 --- a/harbour/include/hbcomp.h +++ b/harbour/include/hbcomp.h @@ -358,7 +358,7 @@ extern BOOL hb_comp_bAutoMemvarAssume; extern BOOL hb_comp_bForceMemvars; extern BOOL hb_comp_bDebugInfo; extern char hb_comp_szPrefix[ 20 ]; -extern BOOL hb_comp_iGenCOutput; +extern int hb_comp_iGenCOutput; extern int hb_comp_iExitLevel; extern int hb_comp_iFunctionCnt; extern char hb_comp_cVarType; diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index 58766f172d..e48bd17dfa 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -99,7 +99,7 @@ BOOL hb_comp_bAutoMemvarAssume = FALSE; /* holds if undeclared va BOOL hb_comp_bForceMemvars = FALSE; /* holds if memvars are assumed when accesing undeclared variable (-v)*/ BOOL hb_comp_bDebugInfo = FALSE; /* holds if generate debugger required info */ char hb_comp_szPrefix[ 20 ] = { '\0' }; /* holds the prefix added to the generated symbol init function name (in C output currently) */ -BOOL hb_comp_iGenCOutput = HB_COMPGENC_VERBOSE; /* C code generation should be verbose (use comments) or not */ +int hb_comp_iGenCOutput = HB_COMPGENC_VERBOSE; /* C code generation should be verbose (use comments) or not */ int hb_comp_iExitLevel = HB_EXITLEVEL_DEFAULT; /* holds if there was any warning during the compilation process */ PATHNAMES * hb_comp_pIncludePath = NULL; int hb_comp_iFunctionCnt; @@ -339,7 +339,7 @@ int isatty( int handle ) void * hb_xgrab( ULONG ulSize ) /* allocates fixed memory, exits on failure */ { void * pMem = malloc( ulSize ); - char * szSize [10]; + char szSize [10]; sprintf( szSize, "%li", ulSize ); @@ -352,7 +352,7 @@ void * hb_xgrab( ULONG ulSize ) /* allocates fixed memory, exits on fail void * hb_xrealloc( void * pMem, ULONG ulSize ) /* reallocates memory */ { void * pResult = realloc( pMem, ulSize ); - char * szSize [10]; + char szSize [10]; sprintf( szSize, "%li", ulSize ); diff --git a/harbour/source/compiler/hbpcode.c b/harbour/source/compiler/hbpcode.c index ff7bfbcbf5..3be5ad90b0 100644 --- a/harbour/source/compiler/hbpcode.c +++ b/harbour/source/compiler/hbpcode.c @@ -442,10 +442,10 @@ void hb_compStrongType( int iSize ) if ( pSym ) { /* TODO: Check this!!! */ - if ( pSym->cScope & HB_FS_PUBLIC == HB_FS_PUBLIC || - pSym->cScope & HB_FS_STATIC == HB_FS_STATIC || - pSym->cScope & HB_FS_INIT == HB_FS_INIT || - pSym->cScope & HB_FS_EXIT == HB_FS_EXIT ) + if ( ( pSym->cScope & HB_FS_PUBLIC ) == HB_FS_PUBLIC || + ( pSym->cScope & HB_FS_STATIC ) == HB_FS_STATIC || + ( pSym->cScope & HB_FS_INIT ) == HB_FS_INIT || + ( pSym->cScope & HB_FS_EXIT ) == HB_FS_EXIT ) /* Storing a Book Mark of the last pushed symbol so we know how many bytes to pop when encountering function call. */ pFunc->pFunctionCalls[ pFunc->iFunctionIndex++ ] = pFunc->iStackIndex;