diff options
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/except.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d0ea05c..35bcd65 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2010-10-27 Jason Merrill <jason@redhat.com> + * except.c (build_throw): Set EXPR_LOCATION. + * tree.c (build_cplus_new): Handle CONSTRUCTOR. * semantics.c (finish_compound_stmt): Avoid creating an diff --git a/gcc/cp/except.c b/gcc/cp/except.c index b917664..cf8a210 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -648,7 +648,9 @@ build_throw (tree exp) { if (cfun) current_function_returns_abnormally = 1; - return build_min (THROW_EXPR, void_type_node, exp); + exp = build_min (THROW_EXPR, void_type_node, exp); + SET_EXPR_LOCATION (exp, input_location); + return exp; } if (exp == null_node) @@ -834,6 +836,7 @@ build_throw (tree exp) } exp = build1 (THROW_EXPR, void_type_node, exp); + SET_EXPR_LOCATION (exp, input_location); return exp; } |