aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c/c-parser.c')
-rw-r--r--gcc/c/c-parser.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 6721049..c7c13a6 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -7477,8 +7477,9 @@ c_parser_sizeof_expression (c_parser *parser)
error_at (expr_loc, "%<sizeof%> applied to a bit-field");
result = c_expr_sizeof_expr (expr_loc, expr);
}
- if (finish != UNKNOWN_LOCATION)
- set_c_expr_source_range (&result, start, finish);
+ if (finish == UNKNOWN_LOCATION)
+ finish = start;
+ set_c_expr_source_range (&result, start, finish);
return result;
}