X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=parser.c;h=225f3b494f4af3566b37925b9f20d50857dbd4c5;hb=c91a949920b54a81853baa202dc1373194825def;hp=dcd6cdc2c7f7b98da799a1ca3c997988bfa1534d;hpb=d2c97d08e22cfca07b4ac98ae8d4a9c5cb3b9261;p=cparser diff --git a/parser.c b/parser.c index dcd6cdc..225f3b4 100644 --- a/parser.c +++ b/parser.c @@ -7442,8 +7442,6 @@ static expression_t *parse_typeprop(expression_kind_t const kind) eat(kind == EXPR_SIZEOF ? T_sizeof : T___alignof__); - char const* const what = kind == EXPR_SIZEOF ? "sizeof" : "alignof"; - /* we only refer to a type property, mark this case */ bool old = in_type_prop; in_type_prop = true; @@ -7481,6 +7479,7 @@ typeprop_expression: type->kind == TYPE_BITFIELD ? "bitfield" : NULL; if (wrong_type != NULL) { + char const* const what = kind == EXPR_SIZEOF ? "sizeof" : "alignof"; errorf(&tp_expression->base.source_position, "operand of %s expression must not be of %s type '%T'", what, wrong_type, orig_type);