/cp
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Aug 2007 14:57:52 +0000 (14:57 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Aug 2007 14:57:52 +0000 (14:57 +0000)
2007-08-10  Paolo Carlini  <pcarlini@suse.de>

PR c++/17763
* error.c (dump_expr): Consistently use the *_cxx_*
variants of the pretty-print functions.

/testsuite
2007-08-10  Paolo Carlini  <pcarlini@suse.de>

PR c++/17763
* g++.dg/other/error16.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127335 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/error16.C [new file with mode: 0644]

index 1260e10..876939b 100644 (file)
@@ -1,5 +1,11 @@
 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
 
+       PR c++/17763
+       * error.c (dump_expr): Consistently use the *_cxx_*
+       variants of the pretty-print functions.
+
+2007-08-10  Paolo Carlini  <pcarlini@suse.de>
+
        PR c++/22256
        * decl.c (check_special_function_return_type): Just error
        on return type specified for conversion operator.
index 46785f9..404fbd0 100644 (file)
@@ -1550,13 +1550,13 @@ dump_expr (tree t, int flags)
            if (TREE_CODE (ob) == ADDR_EXPR)
              {
                dump_expr (TREE_OPERAND (ob, 0), flags | TFF_EXPR_IN_PARENS);
-               pp_dot (cxx_pp);
+               pp_cxx_dot (cxx_pp);
              }
            else if (TREE_CODE (ob) != PARM_DECL
                     || strcmp (IDENTIFIER_POINTER (DECL_NAME (ob)), "this"))
              {
                dump_expr (ob, flags | TFF_EXPR_IN_PARENS);
-               pp_arrow (cxx_pp);
+               pp_cxx_arrow (cxx_pp);
              }
            skipfirst = true;
          }
index b56e0d5..e380348 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-10  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/17763
+       * g++.dg/other/error16.C: New.
+
 2007-08-10  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libfortran/33039
diff --git a/gcc/testsuite/g++.dg/other/error16.C b/gcc/testsuite/g++.dg/other/error16.C
new file mode 100644 (file)
index 0000000..1e34647
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/17763
+
+template <typename U> struct Outer {
+    struct Inner {};
+    Inner foo();
+};
+
+typedef int X;
+typedef Outer<X> XOuter;
+
+int main() {
+  Outer<int>  ab;
+  ab.foo() == 1; // { dg-error "ab.Outer" }
+}