* except.c (build_throw): Set EXPR_LOCATION.
authorJason Merrill <jason@redhat.com>
Wed, 27 Oct 2010 15:48:26 +0000 (11:48 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 27 Oct 2010 15:48:26 +0000 (11:48 -0400)
From-SVN: r166008

gcc/cp/ChangeLog
gcc/cp/except.c

index d0ea05c9231eb8872e9502439ed58c574662dd6e..35bcd65ede443a142bb1f82f67a2013131a377a8 100644 (file)
@@ -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
index b9176647ba70366eeade7e30ee88e22d6bf20509..cf8a210e7796426e456686992a554ed7c338b900 100644 (file)
@@ -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;
 }