diff --git a/ChangeLog.txt b/ChangeLog.txt index d2d2e7ed2f..6f57a453c2 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,18 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2014-10-06 22:35 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * include/hbcomp.h + * include/hbcompdf.h + * src/compiler/hbmain.c + * src/compiler/harbour.y + * src/compiler/harbour.yyc + * replaced 'char' type holder with 'HB_BYTE' - this is part of never + finished code which is completely dummy in current compiler and above + modification is only to pacify warnings which are real bugs in existing + implementation. I do not plan to modify or fix this code. I'll remove + it working on fully functional strong typing implementation. + 2014-10-06 22:15 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/compiler/harbour.y * src/macro/macro.y diff --git a/include/hbcomp.h b/include/hbcomp.h index 89e0fb9e1e..7e80d8e852 100644 --- a/include/hbcomp.h +++ b/include/hbcomp.h @@ -135,7 +135,7 @@ extern void hb_compFunctionMarkStatic( HB_COMP_DECL, const extern HB_EXPORT_INT const char * hb_compGetFuncID( const char * szFuncName, HB_FUNC_ID * pFunID, int * piFlags ); extern HB_BOOL hb_compFunCallCheck( HB_COMP_DECL, const char *, int ); -extern PHB_VARTYPE hb_compVarTypeNew( HB_COMP_DECL, char cVarType, const char * szFromClass ); +extern PHB_VARTYPE hb_compVarTypeNew( HB_COMP_DECL, HB_BYTE cVarType, const char * szFromClass ); extern void hb_compVariableAdd( HB_COMP_DECL, const char * szVarName, PHB_VARTYPE pVarType ); /* add a new param, local, static variable to a function definition or a public or private */ extern PHB_HVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int * piScope ); extern const char * hb_compLocalVariableName( PHB_HFUNC pFunc, HB_USHORT wVar ); /* returns the name of local variable */ diff --git a/include/hbcompdf.h b/include/hbcompdf.h index 84dcce4b1a..1183f20f33 100644 --- a/include/hbcompdf.h +++ b/include/hbcompdf.h @@ -121,7 +121,7 @@ typedef struct HB_CBVAR_ typedef struct _HB_VARTYPE { struct _HB_VARTYPE * pNext; - char cVarType; + HB_BYTE cVarType; const char * szFromClass; } HB_VARTYPE, * PHB_VARTYPE; @@ -788,8 +788,7 @@ typedef struct _HB_COMP char ** szStdChExt; /* extended definitions file names (-u+) */ int iStdChExt; /* number of extended definition files (-u+) */ - char cDataListType; /* current declared variable list type */ - char cCastType; /* current casting type */ + HB_BYTE cDataListType; /* current declared variable list type */ int iErrorCount; int iModulesCount; /* number of compiled .prg modules */ diff --git a/src/compiler/harbour.y b/src/compiler/harbour.y index 3d2fe428d3..81a5c88b59 100644 --- a/src/compiler/harbour.y +++ b/src/compiler/harbour.y @@ -1289,7 +1289,7 @@ DecData : IdentName { HB_COMP_PARAM->pLastMethod = hb_compMethodAdd( HB_COMP_ PHB_HCLASS pClass; char szSetData[ HB_SYMBOL_NAME_LEN + 1 ]; int iLen; - char cVarType = $3->cVarType; + HB_BYTE cVarType = $3->cVarType; /* List Type overrides if exists. */ if( HB_COMP_PARAM->cDataListType ) diff --git a/src/compiler/harbour.yyc b/src/compiler/harbour.yyc index 7e11d12cd9..885598279e 100644 --- a/src/compiler/harbour.yyc +++ b/src/compiler/harbour.yyc @@ -5900,7 +5900,7 @@ yyreduce: PHB_HCLASS pClass; char szSetData[ HB_SYMBOL_NAME_LEN + 1 ]; int iLen; - char cVarType = (yyvsp[0].asVarType)->cVarType; + HB_BYTE cVarType = (yyvsp[0].asVarType)->cVarType; /* List Type overrides if exists. */ if( HB_COMP_PARAM->cDataListType ) diff --git a/src/compiler/hbmain.c b/src/compiler/hbmain.c index 945627ec25..2e3a1d4aa3 100644 --- a/src/compiler/hbmain.c +++ b/src/compiler/hbmain.c @@ -1282,7 +1282,7 @@ void hb_compDeclaredParameterAdd( HB_COMP_DECL, const char * szVarName, PHB_VART } } -PHB_VARTYPE hb_compVarTypeNew( HB_COMP_DECL, char cVarType, const char* szFromClass ) +PHB_VARTYPE hb_compVarTypeNew( HB_COMP_DECL, HB_BYTE cVarType, const char* szFromClass ) { PHB_VARTYPE pVT = HB_COMP_PARAM->pVarType; PHB_VARTYPE* ppVT = &( HB_COMP_PARAM->pVarType );