From c56ba35442a83d6af897bf9a171a126f9ad3f8d9 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 4 Jun 2010 17:42:41 -0400 Subject: cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR. * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR. (pp_cxx_expression): Likewise. From-SVN: r160299 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/cxx-pretty-print.c | 9 +++++++++ 2 files changed, 13 insertions(+) (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9584810..fec4bfd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,10 +1,14 @@ 2010-06-04 Jason Merrill + * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR. + (pp_cxx_expression): Likewise. + Implement noexcept-specification (15.4) * parser.c (cp_parser_exception_specification_opt): Parse it. Give -Wdeprecated warning about throw() specs. * pt.c (tsubst_exception_specification): Handle it. * error.c (dump_exception_spec): Handle it. + (dump_expr): Handle NOEXCEPT_EXPR. * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise. * typeck.c (comp_except_specs): Handle compatibility rules. Change exact parm to take an enum. diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c index e6c68ba..6f4ab6b 100644 --- a/gcc/cp/cxx-pretty-print.c +++ b/gcc/cp/cxx-pretty-print.c @@ -791,6 +791,14 @@ pp_cxx_unary_expression (cxx_pretty_printer *pp, tree t) pp_unary_expression (pp, TREE_OPERAND (t, 0)); break; + case NOEXCEPT_EXPR: + pp_cxx_ws_string (pp, "noexcept"); + pp_cxx_whitespace (pp); + pp_cxx_left_paren (pp); + pp_cxx_expression (pp, TREE_OPERAND (t, 0)); + pp_cxx_right_paren (pp); + break; + case UNARY_PLUS_EXPR: pp_plus (pp); pp_cxx_cast_expression (pp, TREE_OPERAND (t, 0)); @@ -1061,6 +1069,7 @@ pp_cxx_expression (cxx_pretty_printer *pp, tree t) case SIZEOF_EXPR: case ALIGNOF_EXPR: + case NOEXCEPT_EXPR: pp_cxx_unary_expression (pp, t); break; -- cgit v1.1