allow if (void expr) (with warning) in traditional mode

This commit is contained in:
Bill Currie 2002-12-13 23:16:42 +00:00
parent aec0c9eea1
commit 64a9a8199c

View file

@ -1311,6 +1311,10 @@ test_expr (expr_t *e, int test)
error (e, "internal error");
abort ();
case ev_void:
if (options.traditional) {
warning (e, "void has no value");
return e;
}
return error (e, "void has no value");
case ev_string:
new = new_string_expr (0);