diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1260e10a78a..876939b8feb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2007-08-10 Paolo Carlini + + PR c++/17763 + * error.c (dump_expr): Consistently use the *_cxx_* + variants of the pretty-print functions. + 2007-08-10 Paolo Carlini PR c++/22256 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 46785f97da3..404fbd06596 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -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; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b56e0d5ba5f..e3803480e83 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-08-10 Paolo Carlini + + PR c++/17763 + * g++.dg/other/error16.C: New. + 2007-08-10 Jerry DeLisle 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 index 00000000000..1e34647145d --- /dev/null +++ b/gcc/testsuite/g++.dg/other/error16.C @@ -0,0 +1,14 @@ +// PR c++/17763 + +template struct Outer { + struct Inner {}; + Inner foo(); +}; + +typedef int X; +typedef Outer XOuter; + +int main() { + Outer ab; + ab.foo() == 1; // { dg-error "ab.Outer" } +}