symbol *csym = findSymWithLevel (SymbolTab, tree->opval.val->sym);
- /* if found in the symbol table & they r not the same */
+ /* if found in the symbol table & they are not the same */
if (csym && tree->opval.val->sym != csym)
{
tree->opval.val->sym = csym;
}
/* if not found in the symbol table */
- /* mark it as undefined assume it is */
- /* an integer in data space */
+ /* mark it as undefined & assume it */
+ /* is an integer in data space */
if (!csym && !tree->opval.val->sym->implicit)
{
else
functype = func->ftype;
- /* if the function is being called via a pointer & */
- /* it has not been defined a reentrant then we cannot */
- /* have parameters */
+ /* if the function is being called via a pointer & */
+ /* it has not been defined reentrant then we cannot */
+ /* have parameters */
/* PIC16 port can... */
if (!TARGET_IS_PIC16)
{
if (func->type != EX_VALUE && !IFFUNC_ISREENT (functype) && !options.stackAuto)
{
- werror (W_NONRENT_ARGS);
+ werror (E_NONRENT_ARGS);
fatalError++;
return 1;
}
(*actParm)->etype = getSpec ((*actParm)->ftype = copyLinkChain ((*actParm)->ftype));
SPEC_REGPARM ((*actParm)->etype) = SPEC_REGPARM (defParm->etype);
SPEC_ARGREG ((*actParm)->etype) = SPEC_ARGREG (defParm->etype);
+
+ /* if the function is being called via a pointer & */
+ /* this parameter is not passed in registers */
+ /* then the function must be defined reentrant */
+ if (IS_FUNCPTR (func->ftype) && !SPEC_REGPARM ((*actParm)->etype) &&
+ !IFFUNC_ISREENT (functype) && !options.stackAuto)
+ {
+ werror (E_NONRENT_ARGS);
+ fatalError++;
+ return 1;
+ }
+
(*parmNumber)++;
return 0;
}
struct SDCCERRG _SDCCERRG;
-extern char *filename ;
-extern int lineno ;
-extern int fatalError ;
+extern char *filename;
+extern int lineno;
+extern int fatalError;
/* Currently the errIndex field must match the position of the
* entry in the array. It is only included in order to make
{ E_UNARY_OP, ERROR_LEVEL_ERROR,
"'unary %c': illegal operand" },
{ E_CONV_ERR, ERROR_LEVEL_ERROR,
- "convertion error: integral promotion failed" },
+ "conversion error: integral promotion failed" },
{ E_INT_REQD, ERROR_LEVEL_ERROR,
"type must be INT for bit field definition" },
{ E_BITFLD_SIZE, ERROR_LEVEL_ERROR,
"storage class CANNOT be specified for bit variable '%s'" },
{ E_EXTERN_MISMATCH, ERROR_LEVEL_ERROR,
"extern definition for '%s' mismatches with declaration." },
-{ W_NONRENT_ARGS, ERROR_LEVEL_WARNING,
- "Functions called via pointers must be 'reentrant' to take arguments" },
+{ E_NONRENT_ARGS, ERROR_LEVEL_ERROR,
+ "Functions called via pointers must be 'reentrant' to take this many arguments" },
{ W_DOUBLE_UNSUPPORTED, ERROR_LEVEL_WARNING,
"type 'double' not supported assuming 'float'" },
{ W_COMP_RANGE, ERROR_LEVEL_WARNING,
/*
-------------------------------------------------------------------------------
-vwerror - Output a standard eror message with variable number of arguements
+vwerror - Output a standard error message with variable number of arguments
-------------------------------------------------------------------------------
*/
}
/*
-------------------------------------------------------------------------------
-werror - Output a standard eror message with variable number of arguements
+werror - Output a standard error message with variable number of arguments
-------------------------------------------------------------------------------
*/
/*
-------------------------------------------------------------------------------
-werrorfl - Output a standard eror message with variable number of arguements.
+werrorfl - Output a standard error message with variable number of arguments.
Use a specified filename and line number instead of the default.
-------------------------------------------------------------------------------
/*
-------------------------------------------------------------------------------
-fatal - Output a standard eror message with variable number of arguements and
+fatal - Output a standard error message with variable number of arguments and
call exit()
-------------------------------------------------------------------------------
*/