diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2003-07-14 17:45:08 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2003-07-14 17:45:08 +0000 |
commit | 19948e32a8be1a439f58c2d34a7f0b03ec03b85c (patch) | |
tree | 9e88937e0bee4564255bc4672f58497ac390c16f /gcc | |
parent | c18b00c0d3d51780b2842f3cad567feb1a9b9d9f (diff) | |
download | gcc-19948e32a8be1a439f58c2d34a7f0b03ec03b85c.zip gcc-19948e32a8be1a439f58c2d34a7f0b03ec03b85c.tar.gz gcc-19948e32a8be1a439f58c2d34a7f0b03ec03b85c.tar.bz2 |
re PR c++/11510 (Error message with operator __imag__ is missing spaces)
PR c++/11510
* call.c (op_error): Properly handle REALPART_EXPR
and IMAGPART_EXPR.
* error.c (dump_expr): Likewise.
From-SVN: r69340
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/call.c | 5 | ||||
-rw-r--r-- | gcc/cp/error.c | 8 |
3 files changed, 20 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f62013d..8318b91 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,12 @@ 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net> + PR c++/11510 + * call.c (op_error): Properly format REALPART_EXPR and + IMAGPART_EXPR. + * error.c (dump_expr): Likewise. + +2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net> + * error.c (dump_expr): Handle EMPTY_CLASS_EXPR. 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net> diff --git a/gcc/cp/call.c b/gcc/cp/call.c index c71b3f8..bd947f7 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -3010,6 +3010,11 @@ op_error (enum tree_code code, enum tree_code code2, case ARRAY_REF: error ("%s for 'operator[]' in '%E[%E]'", problem, arg1, arg2); break; + + case REALPART_EXPR: + case IMAGPART_EXPR: + error ("%s for '%s' in '%s %E'", problem, opname, opname, arg1); + break; default: if (arg2) diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 1fc4047..b9bc9b2 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1982,6 +1982,14 @@ dump_expr (tree t, int flags) print_right_paren (scratch_buffer); break; + case REALPART_EXPR: + case IMAGPART_EXPR: + print_identifier (scratch_buffer, + operator_name_info[TREE_CODE (t)].name); + output_add_space (scratch_buffer); + dump_expr (TREE_OPERAND (t, 0), flags); + break; + case DEFAULT_ARG: print_identifier (scratch_buffer, "<unparsed>"); break; |