diff -r 9fe6c4633ed6 -r d2cd05c5e01a stage3/print_datatypes_error.cc --- a/stage3/print_datatypes_error.cc Fri Mar 09 10:52:23 2012 +0000 +++ b/stage3/print_datatypes_error.cc Fri Mar 09 17:58:19 2012 +0000 @@ -862,6 +862,15 @@ } void *print_datatypes_error_c::visit(NOT_operator_c *symbol) { + /* NOTE: the standard allows syntax in which the NOT operator is followed by an optional + * NOT [] + * However, it does not define the semantic of the NOT operation when the is specified. + * We therefore consider it an error if an il_operand is specified! + */ + if (il_operand != NULL) + STAGE3_ERROR(0, symbol, symbol, "'NOT' operator may not have an operand."); + if (symbol->candidate_datatypes.size() == 0) + STAGE3_ERROR(0, symbol, symbol, "Data type mismatch for 'NOT' operator."); return NULL; }