1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00

Slightly improved type error messages of 'op='.

This commit is contained in:
acqn 2020-08-08 06:46:22 +08:00 committed by Oliver Schmidt
parent 9fcfa3fc49
commit 9317db6642

View File

@ -3408,7 +3408,7 @@ static void opeq (const GenDesc* Gen, ExprDesc* Expr, const char* Op)
/* There must be an integer or pointer on the left side */
if (!IsClassInt (Expr->Type) && !IsTypePtr (Expr->Type)) {
Error ("Invalid left operand type");
Error ("Invalid left operand for binary operator '%s'", Op);
/* Continue. Wrong code will be generated, but the compiler won't
** break, so this is the best error recovery.
*/
@ -3532,7 +3532,7 @@ static void addsubeq (const GenDesc* Gen, ExprDesc *Expr, const char* Op)
/* There must be an integer or pointer on the left side */
if (!IsClassInt (Expr->Type) && !IsTypePtr (Expr->Type)) {
Error ("Invalid left operand type");
Error ("Invalid left operand for binary operator '%s'", Op);
/* Continue. Wrong code will be generated, but the compiler won't
** break, so this is the best error recovery.
*/