]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/17763 (Wrong context in error message for template parameter)
authorPaolo Carlini <pcarlini@suse.de>
Fri, 10 Aug 2007 18:05:07 +0000 (18:05 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 10 Aug 2007 18:05:07 +0000 (18:05 +0000)
/cp
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.

From-SVN: r127346

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

index 9cb6d56e270009b8692e33f3cf2fa677a158948c..126b3f6a91124c5dba7d32a6c520d51e6da031ff 100644 (file)
@@ -1,3 +1,9 @@
+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-06-20  Dirk Mueller  <dmueller@suse.de>
 
        PR c++/31809
index be4563265d72393dadabbbb4e0d5fda2a62e1bae..e1cdfcd0015e925804b79ebef9e0badaad9d71bd 100644 (file)
@@ -1413,13 +1413,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);
              }
            args = TREE_CHAIN (args);
          }
index a292d2f5c54594e033f789227c0568a8b7d74691..035e3efe8b8c6f73fb33a6202ecbc7653b3640ac 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-01  Andreas Krebbel  <krebbel1@de.ibm.com>
 
        * gcc.dg/20070801-1.c: New testcase.
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" }
+}