{ E_SYNTAX_ERROR, ERROR_LEVEL_ERROR,
"Syntax error, declaration ignored at '%s'" },
{ E_CONST_EXPECTED, ERROR_LEVEL_ERROR,
- "Constant Expected Found Variable" },
+ "Initializer element is not constant" },
{ E_OUT_OF_MEM, ERROR_LEVEL_ERROR,
"'malloc' failed file '%s' for size %ld" },
{ E_FILE_OPEN_ERR, ERROR_LEVEL_ERROR,
{ W_DOUBLE_UNSUPPORTED, ERROR_LEVEL_WARNING,
"type 'double' not supported assuming 'float'" },
{ W_IF_NEVER_TRUE, ERROR_LEVEL_WARNING,
- "if-statement condition always false.if-statement not generated" },
+ "if-statement condition always false, if-statement not generated" },
{ W_FUNC_NO_RETURN, ERROR_LEVEL_WARNING,
"no 'return' statement found for function '%s'" },
{ W_PRE_PROC_WARNING, ERROR_LEVEL_WARNING,
"both signed and unsigned specified for %s '%s'" },
{ E_TWO_OR_MORE_STORAGE_CLASSES, ERROR_LEVEL_ERROR,
"two or more storage classes in declaration for '%s'" },
-{ W_EXESS_ARRAY_INITIALIZERS, ERROR_LEVEL_WARNING,
- "excess elements in array initializer after `%s' at line %d" },
+{ W_EXCESS_INITIALIZERS, ERROR_LEVEL_WARNING,
+ "excess elements in %s initializer after `%s' at line %d" },
{ E_ARGUMENT_MISSING, ERROR_LEVEL_ERROR,
"Option %s requires an argument." },
{ W_STRAY_BACKSLASH, ERROR_LEVEL_WARNING,
"converting pointer to integral without a cast" },
{ W_SYMBOL_NAME_TOO_LONG, ERROR_LEVEL_WARNING,
"symbol name too long, truncated to %d chars" },
+{ W_CAST_STRUCT_PTR,ERROR_LEVEL_WARNING,
+ "cast of struct %s * to struct %s * " },
+{ W_IF_ALWAYS_TRUE, ERROR_LEVEL_WARNING,
+ "if-statement condition always true, if-statement not generated" },
};
/*
if (ErrTab[errNum].errIndex != errNum)
{
fprintf(_SDCCERRG.out,
- "*** Internal error: error table entry for %d inconsistent.", errNum);
+ "Internal error: error table entry for %d inconsistent.", errNum);
}
fatalError++ ;
if ( filename && lineno ) {
- fprintf(_SDCCERRG.out, "%s(%d):",filename,lineno);
+ fprintf(_SDCCERRG.out, "%s:%d: ",filename,lineno);
} else if (lineno) {
- fprintf(_SDCCERRG.out, "at %d:", lineno);
+ fprintf(_SDCCERRG.out, "at %d: ", lineno);
+ } else {
+ fprintf(_SDCCERRG.out, "-:0: ");
}
switch(ErrTab[errNum].errType)
{
case ERROR_LEVEL_ERROR:
- fprintf(_SDCCERRG.out, "error *** ");
+ fprintf(_SDCCERRG.out, "error: ");
break;
case ERROR_LEVEL_WARNING:
case ERROR_LEVEL_PEDANTIC:
- fprintf(_SDCCERRG.out, "warning *** ");
+ fprintf(_SDCCERRG.out, "warning: ");
break;
case ERROR_LEVEL_INFO:
- fprintf(_SDCCERRG.out, "info *** ");
+ fprintf(_SDCCERRG.out, "info: ");
break;
default:
break;