diff options
-rw-r--r-- | evaluate.c | 4 | ||||
-rw-r--r-- | validation/generic-dr481.c | 1 |
2 files changed, 3 insertions, 2 deletions
@@ -3290,7 +3290,9 @@ static struct symbol *evaluate_generic_selection(struct expression *expr) struct symbol source; struct symbol *ctrl; - if (!(ctrl = evaluate_expression(expr->control))) + if (!evaluate_expression(expr->control)) + return NULL; + if (!(ctrl = degenerate(expr->control))) return NULL; source = *ctrl; diff --git a/validation/generic-dr481.c b/validation/generic-dr481.c index 2ed15c9b..a2d27b98 100644 --- a/validation/generic-dr481.c +++ b/validation/generic-dr481.c @@ -7,7 +7,6 @@ static char const* f = _Generic(+(int const){ 0 }, int const: "blu"); /* * check-name: generic-dr481 - * check-known-to-fail * * check-error-start generic-dr481.c:2:32: error: no generic selection for 'char *' |