equal
deleted
inserted
replaced
860 STAGE3_ERROR(0, symbol, symbol, "Data type mismatch for 'STN' operator."); |
860 STAGE3_ERROR(0, symbol, symbol, "Data type mismatch for 'STN' operator."); |
861 return NULL; |
861 return NULL; |
862 } |
862 } |
863 |
863 |
864 void *print_datatypes_error_c::visit(NOT_operator_c *symbol) { |
864 void *print_datatypes_error_c::visit(NOT_operator_c *symbol) { |
|
865 /* NOTE: the standard allows syntax in which the NOT operator is followed by an optional <il_operand> |
|
866 * NOT [<il_operand>] |
|
867 * However, it does not define the semantic of the NOT operation when the <il_operand> is specified. |
|
868 * We therefore consider it an error if an il_operand is specified! |
|
869 */ |
|
870 if (il_operand != NULL) |
|
871 STAGE3_ERROR(0, symbol, symbol, "'NOT' operator may not have an operand."); |
|
872 if (symbol->candidate_datatypes.size() == 0) |
|
873 STAGE3_ERROR(0, symbol, symbol, "Data type mismatch for 'NOT' operator."); |
865 return NULL; |
874 return NULL; |
866 } |
875 } |
867 |
876 |
868 void *print_datatypes_error_c::visit(S_operator_c *symbol) { |
877 void *print_datatypes_error_c::visit(S_operator_c *symbol) { |
869 /* TODO: what if this is a FB call ?? */ |
878 /* TODO: what if this is a FB call ?? */ |