public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [C++ Patch] PR 17763
@ 2007-08-10 14:32 Paolo Carlini
  2007-08-10 14:48 ` Mark Mitchell
  2007-08-10 16:52 ` Gabriel Dos Reis
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Carlini @ 2007-08-10 14:32 UTC (permalink / raw)
  To: gcc-patches; +Cc: Mark Mitchell

[-- Attachment #1: Type: text/plain, Size: 133 bytes --]

Hi,

this is to fix the remaining bit of the PR. Tested x86_64-linux.

Ok for mainline (and then 4_2 and 4_1)?

////////////////////

[-- Attachment #2: CL_17763 --]
[-- Type: text/plain, Size: 264 bytes --]

/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.

[-- Attachment #3: patch_17763 --]
[-- Type: text/plain, Size: 1500 bytes --]

Index: testsuite/g++.dg/other/error16.C
===================================================================
*** testsuite/g++.dg/other/error16.C	(revision 0)
--- testsuite/g++.dg/other/error16.C	(revision 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" }
+ }
Index: cp/error.c
===================================================================
*** cp/error.c	(revision 127330)
--- cp/error.c	(working copy)
*************** dump_expr (tree t, int flags)
*** 1550,1562 ****
  	    if (TREE_CODE (ob) == ADDR_EXPR)
  	      {
  		dump_expr (TREE_OPERAND (ob, 0), flags | TFF_EXPR_IN_PARENS);
! 		pp_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);
  	      }
  	    skipfirst = true;
  	  }
--- 1550,1562 ----
  	    if (TREE_CODE (ob) == ADDR_EXPR)
  	      {
  		dump_expr (TREE_OPERAND (ob, 0), flags | TFF_EXPR_IN_PARENS);
! 		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_cxx_arrow (cxx_pp);
  	      }
  	    skipfirst = true;
  	  }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [C++ Patch] PR 17763
  2007-08-10 14:32 [C++ Patch] PR 17763 Paolo Carlini
@ 2007-08-10 14:48 ` Mark Mitchell
  2007-08-10 16:52 ` Gabriel Dos Reis
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Mitchell @ 2007-08-10 14:48 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: gcc-patches

Paolo Carlini wrote:

> this is to fix the remaining bit of the PR. Tested x86_64-linux.
> 
> Ok for mainline (and then 4_2 and 4_1)?

OK.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [C++ Patch] PR 17763
  2007-08-10 14:32 [C++ Patch] PR 17763 Paolo Carlini
  2007-08-10 14:48 ` Mark Mitchell
@ 2007-08-10 16:52 ` Gabriel Dos Reis
  1 sibling, 0 replies; 3+ messages in thread
From: Gabriel Dos Reis @ 2007-08-10 16:52 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: gcc-patches, Mark Mitchell

Paolo Carlini <pcarlini@suse.de> writes:

| Hi,
| 
| this is to fix the remaining bit of the PR. Tested x86_64-linux.
| 
| Ok for mainline (and then 4_2 and 4_1)?

yes, thanks!

-- Gaby

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-10 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-10 14:32 [C++ Patch] PR 17763 Paolo Carlini
2007-08-10 14:48 ` Mark Mitchell
2007-08-10 16:52 ` Gabriel Dos Reis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).