error.c (dump_exception_spec): Print "noexcept" rather than "noexcept (true)".
authorJason Merrill <jason@redhat.com>
Wed, 16 Oct 2013 21:58:29 +0000 (17:58 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 16 Oct 2013 21:58:29 +0000 (17:58 -0400)
* error.c (dump_exception_spec): Print "noexcept" rather than
"noexcept (true)".

From-SVN: r203726

gcc/cp/ChangeLog
gcc/cp/error.c

index 2852f1f1c75794fff93865ebe073765d77e56f22..2091b9fc595402f9de8ac2426e184d81f707334c 100644 (file)
@@ -1,5 +1,8 @@
 2013-10-16  Jason Merrill  <jason@redhat.com>
 
+       * error.c (dump_exception_spec): Print "noexcept" rather than
+       "noexcept (true)".
+
        Core 1591
        * pt.c (unify_array_domain): Split out from unify.
        (unify): Use it for list deduction, too.
index 0c3cead1b2721df42effcbdae618de61fa32884e..3f6f5948a6651b50fbf3acaed7735da9c39015a0 100644 (file)
@@ -1595,13 +1595,16 @@ dump_exception_spec (cxx_pretty_printer *pp, tree t, int flags)
   if (t && TREE_PURPOSE (t))
     {
       pp_cxx_ws_string (pp, "noexcept");
-      pp_cxx_whitespace (pp);
-      pp_cxx_left_paren (pp);
-      if (DEFERRED_NOEXCEPT_SPEC_P (t))
-       pp_cxx_ws_string (pp, "<uninstantiated>");
-      else
-       dump_expr (pp, TREE_PURPOSE (t), flags);
-      pp_cxx_right_paren (pp);
+      if (!integer_onep (TREE_PURPOSE (t)))
+       {
+         pp_cxx_whitespace (pp);
+         pp_cxx_left_paren (pp);
+         if (DEFERRED_NOEXCEPT_SPEC_P (t))
+           pp_cxx_ws_string (pp, "<uninstantiated>");
+         else
+           dump_expr (pp, TREE_PURPOSE (t), flags);
+         pp_cxx_right_paren (pp);
+       }
     }
   else if (t)
     {