re PR c++/50611 (Error reporting routines re-entered)
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 11 Oct 2011 13:07:52 +0000 (13:07 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 11 Oct 2011 13:07:52 +0000 (13:07 +0000)
2011-10-11  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/50611
* pt.c (tsubst_copy_and_build): If (complain & tf_error) is false
do not call unqualified_name_lookup_error.

From-SVN: r179802

gcc/cp/ChangeLog
gcc/cp/pt.c

index d36ffaa83e591bca3f9e8eded7ed15d68a4e6cf4..3be7f7d8f05e4fd836131227e7f17b23ec2eede6 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/50611
+       * pt.c (tsubst_copy_and_build): If (complain & tf_error) is false
+       do not call unqualified_name_lookup_error.
+
 2011-10-10  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/50660
index c95f1cb64364616885e585eb0a0c3e6640bd5eae..2cb478d8053f1846d3709f5932a443e90ea15fa1 100644 (file)
@@ -13026,7 +13026,11 @@ tsubst_copy_and_build (tree t,
        if (error_msg)
          error (error_msg);
        if (!function_p && TREE_CODE (decl) == IDENTIFIER_NODE)
-         decl = unqualified_name_lookup_error (decl);
+         {
+           if (complain & tf_error)
+             unqualified_name_lookup_error (decl);
+           decl = error_mark_node;
+         }
        return decl;
       }