Slightly improved type error messages of 'op='.
This commit is contained in:
@@ -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 */
|
/* There must be an integer or pointer on the left side */
|
||||||
if (!IsClassInt (Expr->Type) && !IsTypePtr (Expr->Type)) {
|
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
|
/* Continue. Wrong code will be generated, but the compiler won't
|
||||||
** break, so this is the best error recovery.
|
** 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 */
|
/* There must be an integer or pointer on the left side */
|
||||||
if (!IsClassInt (Expr->Type) && !IsTypePtr (Expr->Type)) {
|
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
|
/* Continue. Wrong code will be generated, but the compiler won't
|
||||||
** break, so this is the best error recovery.
|
** break, so this is the best error recovery.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user