X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=parser.c;h=598f61cb2926ee2ed93e494c6e0852104f43f1ef;hb=643026ae19cfdb8e3c891407f155668768028325;hp=00a8ed4f0cf1346565dff169f224452c2c1c46f2;hpb=ee09de8186297b3a4899db67d2d3af5eb0a19ff6;p=cparser diff --git a/parser.c b/parser.c index 00a8ed4..598f61c 100644 --- a/parser.c +++ b/parser.c @@ -7874,9 +7874,10 @@ typeprop_expression: tp_expression->typeprop.type = orig_type; type_t const* const type = skip_typeref(orig_type); char const* const wrong_type = - is_type_incomplete(type) ? "incomplete" : - type->kind == TYPE_FUNCTION ? "function designator" : - type->kind == TYPE_BITFIELD ? "bitfield" : + GNU_MODE && is_type_atomic(type, ATOMIC_TYPE_VOID) ? NULL : + is_type_incomplete(type) ? "incomplete" : + type->kind == TYPE_FUNCTION ? "function designator" : + type->kind == TYPE_BITFIELD ? "bitfield" : NULL; if (wrong_type != NULL) { char const* const what = kind == EXPR_SIZEOF ? "sizeof" : "alignof"; @@ -8241,6 +8242,7 @@ static expression_t *parse_conditional_expression(expression_t *expression) } rem_anchor_token(':'); expect(':', end_error); +end_error:; expression_t *false_expression = parse_sub_expression(c_mode & _CXX ? PREC_ASSIGNMENT : PREC_CONDITIONAL); @@ -8349,8 +8351,6 @@ static expression_t *parse_conditional_expression(expression_t *expression) = create_implicit_cast(false_expression, result_type); conditional->base.type = result_type; return result; -end_error: - return create_invalid_expression(); } /**