mirror of
https://github.com/cc65/cc65.git
synced 2025-02-07 20:30:49 +00:00
Merge pull request #1784 from acqn/Diagnostics
[cc65] Slight improvements on diagnostics
This commit is contained in:
commit
c802980d6a
@ -4211,7 +4211,8 @@ ExprDesc NoCodeConstExpr (void (*Func) (ExprDesc*))
|
||||
if (!ED_IsConst (&Expr) || !ED_CodeRangeIsEmpty (&Expr)) {
|
||||
Error ("Constant expression expected");
|
||||
/* To avoid any compiler errors, make the expression a valid const */
|
||||
ED_MakeConstAbsInt (&Expr, 1);
|
||||
Expr.Flags &= E_MASK_RTYPE | E_MASK_KEEP_RESULT;
|
||||
Expr.Flags |= E_LOC_NONE;
|
||||
}
|
||||
|
||||
/* Return by value */
|
||||
|
@ -728,6 +728,7 @@ static int HandleSymRedefinition (SymEntry* Entry, const Type* T, unsigned Flags
|
||||
/* New type must be compatible with the composite prototype */
|
||||
if (IsDistinctRedef (E_Type, T, TC_EQUAL, TCF_MASK_QUAL)) {
|
||||
Error ("Conflicting function types for '%s'", Entry->Name);
|
||||
TypeCompatibilityDiagnostic (T, E_Type, 0, "'%s' vs '%s'");
|
||||
Entry = 0;
|
||||
} else {
|
||||
/* Refine the existing composite prototype with this new
|
||||
|
Loading…
x
Reference in New Issue
Block a user