This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Mark Mitchell <mark@codesourcery.com> writes: [...] | In PR 20148, we were trying to dump statement-expressions in our | diagnostic machinery, which is neither going to work nor be helpful to | users. Fixed by printing just "({...})" instead. Also, we were | failing to handle some of the representations we can get these days. [...] | PR c++/20148 | * error.c (dump_expr): Do not print the body of a BIND_EXPR. | Handle STATEMENT_LIST. [...] | - case BIND_EXPR: | - pp_cxx_left_brace (cxx_pp); | - dump_expr (TREE_OPERAND (t, 1), flags & ~TFF_EXPR_IN_PARENS); | - pp_cxx_right_brace (cxx_pp); | - break; | - Actually, we do have machinery to print statement-expression. It is just that calling dump_expr() is wrong. Will be addressed in 4.1 era. [...] | + case BIND_EXPR: | case STMT_EXPR: | + case STATEMENT_LIST: | /* We don't yet have a way of dumping statements in a | human-readable format. */ | pp_string (cxx_pp, "({...})"); | break; We do already have machinery to handle STATEMENT_LIST. It was wrongly put in gcc/tree-pretty-print.c -- it should have been in c-pretty-print.c -- and guarded with the wrong conditionals. I already have a patch for that in my local tree. Will be addressed in 4.1. -- Gaby
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |