summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-16 21:58:29 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-16 21:58:29 +0000
commit9a24276ff9d72d77b7f1190753e23073a93e7fc6 (patch)
tree691bffada06ae0b5f5aa0e7ff8465cb387dda6d5 /gcc/cp
parent7e9e01e4618ac2709ae325f50a2c8ac99b5c2aa3 (diff)
downloadgcc-9a24276ff9d72d77b7f1190753e23073a93e7fc6.tar.gz
* error.c (dump_exception_spec): Print "noexcept" rather than
"noexcept (true)". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203726 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/error.c17
2 files changed, 13 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2852f1f1c75..2091b9fc595 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 0c3cead1b27..3f6f5948a66 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -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)
{