]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/11510 (Error message with operator __imag__ is missing spaces)
authorGabriel Dos Reis <gdr@integrable-solutions.net>
Mon, 14 Jul 2003 17:45:08 +0000 (17:45 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Mon, 14 Jul 2003 17:45:08 +0000 (17:45 +0000)
PR c++/11510
* call.c (op_error): Properly handle REALPART_EXPR
  and IMAGPART_EXPR.
* error.c (dump_expr): Likewise.

From-SVN: r69340

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

index f62013dcb8db3edd909c17743a22856a21a21d16..8318b914020507ee629a9f9e21e76743015e63ab 100644 (file)
@@ -1,3 +1,10 @@
+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.
index c71b3f85dfa86bc79dd70134ff95e863f1d558ec..bd947f7a8aa38428529e708abb698b0cfc99689a 100644 (file)
@@ -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)
index 1fc4047d58fde13889cb744b6b76db4f5aaa24ae..b9bc9b2e791cbc3e188c0711c8111cf795565ec3 100644 (file)
@@ -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;