public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [C++, diagnostic] PR 33494
@ 2007-10-29 12:17 Paolo Carlini
  2007-10-29 13:21 ` Gabriel Dos Reis
  0 siblings, 1 reply; 9+ messages in thread
From: Paolo Carlini @ 2007-10-29 12:17 UTC (permalink / raw)
  To: Gcc Patch List; +Cc: gdr

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

Hi all, hi Gaby,

another small diagnostic issue, cxx-pretty-print already deals with
modop_expr.

Tested x86_64-linux. Ok for mainline?

Paolo.

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

[-- Attachment #2: CL_33494 --]
[-- Type: text/plain, Size: 381 bytes --]

/cp
2007-10-29  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33494
	* cxx-pretty-print.c (pp_cxx_modop_expression): Split out from...
	(pp_cxx_assignment_expression): ... here, adjust.
	* cxx-pretty-print.h (pp_cxx_modop_expression): Declare.
	* error.c (dump_expr): Use it.

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

	PR c++/33494
	* g++.dg/template/error35.C: New.

[-- Attachment #3: patch_33494 --]
[-- Type: text/plain, Size: 2646 bytes --]

Index: testsuite/g++.dg/template/error35.C
===================================================================
*** testsuite/g++.dg/template/error35.C	(revision 0)
--- testsuite/g++.dg/template/error35.C	(revision 0)
***************
*** 0 ****
--- 1,3 ----
+ // PR c++/33494
+ 
+ template<int> void foo(int(*f=0)()); // { dg-error "declared void|scope|erroneous-expression" }
Index: cp/error.c
===================================================================
*** cp/error.c	(revision 129707)
--- cp/error.c	(working copy)
*************** dump_expr (tree t, int flags)
*** 2062,2067 ****
--- 2062,2071 ----
        pp_cxx_delete_expression (cxx_pp, t);
        break;
  
+     case MODOP_EXPR:
+       pp_cxx_modop_expression (cxx_pp, t);
+       break;
+ 
        /*  This list is incomplete, but should suffice for now.
  	  It is very important that `sorry' does not call
  	  `report_error_function'.  That could cause an infinite loop.  */
Index: cp/cxx-pretty-print.c
===================================================================
*** cp/cxx-pretty-print.c	(revision 129715)
--- cp/cxx-pretty-print.c	(working copy)
*************** pp_cxx_assignment_expression (cxx_pretty
*** 953,961 ****
        break;
  
      case MODOP_EXPR:
!       pp_c_logical_or_expression (pp_c_base (pp), TREE_OPERAND (e, 0));
!       pp_cxx_assignment_operator (pp, TREE_OPERAND (e, 1));
!       pp_cxx_assignment_expression (pp, TREE_OPERAND (e, 2));
        break;
  
      default:
--- 953,959 ----
        break;
  
      case MODOP_EXPR:
!       pp_cxx_modop_expression (pp, e);
        break;
  
      default:
*************** pp_cxx_va_arg_expression (cxx_pretty_pri
*** 2185,2190 ****
--- 2183,2196 ----
    pp_cxx_right_paren (pp);
  }
  
+ void
+ pp_cxx_modop_expression (cxx_pretty_printer *pp, tree t)
+ {
+   pp_c_logical_or_expression (pp_c_base (pp), TREE_OPERAND (t, 0));
+   pp_cxx_assignment_operator (pp, TREE_OPERAND (t, 1));
+   pp_cxx_assignment_expression (pp, TREE_OPERAND (t, 2));
+ }
+ 
  static bool
  pp_cxx_offsetof_expression_1 (cxx_pretty_printer *pp, tree t)
  {
Index: cp/cxx-pretty-print.h
===================================================================
*** cp/cxx-pretty-print.h	(revision 129715)
--- cp/cxx-pretty-print.h	(working copy)
*************** void pp_cxx_typeid_expression (cxx_prett
*** 74,78 ****
--- 74,79 ----
  void pp_cxx_va_arg_expression (cxx_pretty_printer *, tree);
  void pp_cxx_offsetof_expression (cxx_pretty_printer *, tree);
  void pp_cxx_delete_expression (cxx_pretty_printer *, tree);
+ void pp_cxx_modop_expression (cxx_pretty_printer *, tree);
  
  #endif /* GCC_CXX_PRETTY_PRINT_H */

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

* Re: [C++, diagnostic] PR 33494
  2007-10-29 12:17 [C++, diagnostic] PR 33494 Paolo Carlini
@ 2007-10-29 13:21 ` Gabriel Dos Reis
  2007-10-29 14:25   ` Paolo Carlini
  0 siblings, 1 reply; 9+ messages in thread
From: Gabriel Dos Reis @ 2007-10-29 13:21 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Gcc Patch List

On Mon, 29 Oct 2007, Paolo Carlini wrote:

| Hi all, hi Gaby,
| 
| another small diagnostic issue, cxx-pretty-print already deals with
| modop_expr.
| 
| Tested x86_64-linux. Ok for mainline?

Hi Paolo, could we just call pp_cxx_expression instead of the split?

-- Gaby

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

* Re: [C++, diagnostic] PR 33494
  2007-10-29 13:21 ` Gabriel Dos Reis
@ 2007-10-29 14:25   ` Paolo Carlini
  2007-11-01  1:41     ` Gabriel Dos Reis
  0 siblings, 1 reply; 9+ messages in thread
From: Paolo Carlini @ 2007-10-29 14:25 UTC (permalink / raw)
  To: Gabriel Dos Reis; +Cc: Gcc Patch List

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

Hi Gaby,
> Hi Paolo, could we just call pp_cxx_expression instead of the split?
>   
Sure, if we can "export" the entire pp_cxx_expression we can also start
tidying a bit error.c, I started on that in the below, picking some safe
recent bits. Tested x86_64-linux. Is it ok?

By the way, in that context, I'm puzzled by the way pp_cxx_expression
deals with NON_DEPENDENT_EXPR. Is it calling itself or what?

Thanks,
Paolo.

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

[-- Attachment #2: CL_33494_2 --]
[-- Type: text/plain, Size: 531 bytes --]

/cp
2007-10-29  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33494
	* cxx-pretty-print.c (pp_cxx_expression): Change to extern linkage.
	(pp_cxx_typeid_expression, pp_cxx_delete_expression): Change to
	static linkage.
	* cxx-pretty-print.h: Adjust declarations.
	* error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
	MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
	MODOP_EXPR): Forward to pp_cxx_expression.

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

	PR c++/33494
	* g++.dg/template/error35.C: New.

[-- Attachment #3: patch_33494_2 --]
[-- Type: text/plain, Size: 5518 bytes --]

Index: testsuite/g++.dg/template/error35.C
===================================================================
*** testsuite/g++.dg/template/error35.C	(revision 0)
--- testsuite/g++.dg/template/error35.C	(revision 0)
***************
*** 0 ****
--- 1,3 ----
+ // PR c++/33494
+ 
+ template<int> void foo(int(*f=0)()); // { dg-error "declared void|scope|erroneous-expression" }
Index: cp/error.c
===================================================================
*** cp/error.c	(revision 129707)
--- cp/error.c	(working copy)
*************** dump_expr (tree t, int flags)
*** 2004,2014 ****
        dump_expr (TREE_OPERAND (t, 0), flags);
        break;
  
-     case EXPR_PACK_EXPANSION:
-       dump_expr (PACK_EXPANSION_PATTERN (t), flags);
-       pp_cxx_identifier (cxx_pp, "...");
-       break;
- 
      case ARGUMENT_PACK_SELECT:
        dump_template_argument (ARGUMENT_PACK_SELECT_FROM_PACK (t), flags);
        break;
--- 2004,2009 ----
*************** dump_expr (tree t, int flags)
*** 2040,2049 ****
        pp_cxx_trait_expression (cxx_pp, t);
        break;
  
-     case TYPEID_EXPR:
-       pp_cxx_typeid_expression (cxx_pp, t);
-       break;
- 
      case VA_ARG_EXPR:
        pp_cxx_va_arg_expression (cxx_pp, t);
        break;
--- 2035,2040 ----
*************** dump_expr (tree t, int flags)
*** 2052,2065 ****
        pp_cxx_offsetof_expression (cxx_pp, t);
        break;
  
      case MEMBER_REF:
      case DOTSTAR_EXPR:
-       pp_multiplicative_expression (cxx_pp, t);
-       break;
- 
      case DELETE_EXPR:
      case VEC_DELETE_EXPR:
!       pp_cxx_delete_expression (cxx_pp, t);
        break;
  
        /*  This list is incomplete, but should suffice for now.
--- 2043,2056 ----
        pp_cxx_offsetof_expression (cxx_pp, t);
        break;
  
+     case EXPR_PACK_EXPANSION:
+     case TYPEID_EXPR:
      case MEMBER_REF:
      case DOTSTAR_EXPR:
      case DELETE_EXPR:
      case VEC_DELETE_EXPR:
!     case MODOP_EXPR:
!       pp_cxx_expression (cxx_pp, t);
        break;
  
        /*  This list is incomplete, but should suffice for now.
Index: cp/cxx-pretty-print.c
===================================================================
*** cp/cxx-pretty-print.c	(revision 129717)
--- cp/cxx-pretty-print.c	(working copy)
*************** static void pp_cxx_unqualified_id (cxx_p
*** 31,37 ****
  static void pp_cxx_nested_name_specifier (cxx_pretty_printer *, tree);
  static void pp_cxx_qualified_id (cxx_pretty_printer *, tree);
  static void pp_cxx_assignment_expression (cxx_pretty_printer *, tree);
- static void pp_cxx_expression (cxx_pretty_printer *, tree);
  static void pp_cxx_template_argument_list (cxx_pretty_printer *, tree);
  static void pp_cxx_type_specifier_seq (cxx_pretty_printer *, tree);
  static void pp_cxx_ptr_operator (cxx_pretty_printer *, tree);
--- 31,36 ----
*************** static void pp_cxx_abstract_declarator (
*** 43,48 ****
--- 42,48 ----
  static void pp_cxx_statement (cxx_pretty_printer *, tree);
  static void pp_cxx_template_parameter (cxx_pretty_printer *, tree);
  static void pp_cxx_cast_expression (cxx_pretty_printer *, tree);
+ static void pp_cxx_typeid_expression (cxx_pretty_printer *, tree);
  \f
  
  static inline void
*************** pp_cxx_new_expression (cxx_pretty_printe
*** 672,678 ****
        ::(opt) delete cast-expression
        ::(opt) delete [ ] cast-expression   */
  
! void
  pp_cxx_delete_expression (cxx_pretty_printer *pp, tree t)
  {
    enum tree_code code = TREE_CODE (t);
--- 672,678 ----
        ::(opt) delete cast-expression
        ::(opt) delete [ ] cast-expression   */
  
! static void
  pp_cxx_delete_expression (cxx_pretty_printer *pp, tree t)
  {
    enum tree_code code = TREE_CODE (t);
*************** pp_cxx_assignment_expression (cxx_pretty
*** 964,970 ****
      }
  }
  
! static void
  pp_cxx_expression (cxx_pretty_printer *pp, tree t)
  {
    switch (TREE_CODE (t))
--- 964,970 ----
      }
  }
  
! void
  pp_cxx_expression (cxx_pretty_printer *pp, tree t)
  {
    switch (TREE_CODE (t))
*************** pp_cxx_declaration (cxx_pretty_printer *
*** 2161,2167 ****
      }
  }
  
! void
  pp_cxx_typeid_expression (cxx_pretty_printer *pp, tree t)
  {
    t = TREE_OPERAND (t, 0);
--- 2161,2167 ----
      }
  }
  
! static void
  pp_cxx_typeid_expression (cxx_pretty_printer *pp, tree t)
  {
    t = TREE_OPERAND (t, 0);
Index: cp/cxx-pretty-print.h
===================================================================
*** cp/cxx-pretty-print.h	(revision 129715)
--- cp/cxx-pretty-print.h	(working copy)
*************** void pp_cxx_separate_with (cxx_pretty_pr
*** 70,78 ****
  void pp_cxx_declaration (cxx_pretty_printer *, tree);
  void pp_cxx_canonical_template_parameter (cxx_pretty_printer *, tree);
  void pp_cxx_trait_expression (cxx_pretty_printer *, tree);
- void pp_cxx_typeid_expression (cxx_pretty_printer *, tree);
  void pp_cxx_va_arg_expression (cxx_pretty_printer *, tree);
  void pp_cxx_offsetof_expression (cxx_pretty_printer *, tree);
! void pp_cxx_delete_expression (cxx_pretty_printer *, tree);
  
  #endif /* GCC_CXX_PRETTY_PRINT_H */
--- 70,77 ----
  void pp_cxx_declaration (cxx_pretty_printer *, tree);
  void pp_cxx_canonical_template_parameter (cxx_pretty_printer *, tree);
  void pp_cxx_trait_expression (cxx_pretty_printer *, tree);
  void pp_cxx_va_arg_expression (cxx_pretty_printer *, tree);
  void pp_cxx_offsetof_expression (cxx_pretty_printer *, tree);
! void pp_cxx_expression (cxx_pretty_printer *, tree);
  
  #endif /* GCC_CXX_PRETTY_PRINT_H */

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

* Re: [C++, diagnostic] PR 33494
  2007-10-29 14:25   ` Paolo Carlini
@ 2007-11-01  1:41     ` Gabriel Dos Reis
  2007-11-01  2:00       ` Gabriel Dos Reis
  2007-11-01  2:13       ` Paolo Carlini
  0 siblings, 2 replies; 9+ messages in thread
From: Gabriel Dos Reis @ 2007-11-01  1:41 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Gcc Patch List

Paolo Carlini <pcarlini@suse.de> writes:

| Hi Gaby,
| > Hi Paolo, could we just call pp_cxx_expression instead of the split?
| >   
| Sure, if we can "export" the entire pp_cxx_expression we can also start
| tidying a bit error.c, I started on that in the below, picking some safe
| recent bits. Tested x86_64-linux. Is it ok?

Hi Paolo,

sorry for the delay.


| 
| By the way, in that context, I'm puzzled by the way pp_cxx_expression
| deals with NON_DEPENDENT_EXPR. Is it calling itself or what?
| 
| Thanks,
| Paolo.
| 
| ///////////////
| /cp
| 2007-10-29  Paolo Carlini  <pcarlini@suse.de>
| 
| 	PR c++/33494
| 	* cxx-pretty-print.c (pp_cxx_expression): Change to extern linkage.

I was meaning to actually call pp_expression(), which indirectly calls
pp_cxx_expression. 

  

| 	* cxx-pretty-print.h: Adjust declarations.
| 	* error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
| 	MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
| 	MODOP_EXPR): Forward to pp_cxx_expression.

This part is OK, if you s/pp_cxx_expression/pp_expression/ and it
passes regression tests.

-- Gaby

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

* Re: [C++, diagnostic] PR 33494
  2007-11-01  1:41     ` Gabriel Dos Reis
@ 2007-11-01  2:00       ` Gabriel Dos Reis
  2007-11-01  2:04         ` Paolo Carlini
  2007-11-01  2:13       ` Paolo Carlini
  1 sibling, 1 reply; 9+ messages in thread
From: Gabriel Dos Reis @ 2007-11-01  2:00 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Gcc Patch List


| By the way, in that context, I'm puzzled by the way pp_cxx_expression
| deals with NON_DEPENDENT_EXPR. Is it calling itself or what?

That is a bug.  It should be

   pp_cxx_expression (pp, TREE_OPERAND (t, 0))


-- Gaby

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

* Re: [C++, diagnostic] PR 33494
  2007-11-01  2:00       ` Gabriel Dos Reis
@ 2007-11-01  2:04         ` Paolo Carlini
  2007-11-01  2:04           ` Gabriel Dos Reis
  0 siblings, 1 reply; 9+ messages in thread
From: Paolo Carlini @ 2007-11-01  2:04 UTC (permalink / raw)
  To: Gabriel Dos Reis; +Cc: Gcc Patch List

Gabriel Dos Reis wrote:
> | By the way, in that context, I'm puzzled by the way pp_cxx_expression
> | deals with NON_DEPENDENT_EXPR. Is it calling itself or what?
>
> That is a bug.  It should be
>
>    pp_cxx_expression (pp, TREE_OPERAND (t, 0))
>   
Ok, I'm fixing this too at the same time.

Paolo.

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

* Re: [C++, diagnostic] PR 33494
  2007-11-01  2:04         ` Paolo Carlini
@ 2007-11-01  2:04           ` Gabriel Dos Reis
  0 siblings, 0 replies; 9+ messages in thread
From: Gabriel Dos Reis @ 2007-11-01  2:04 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Gcc Patch List

On Thu, 1 Nov 2007, Paolo Carlini wrote:

| Gabriel Dos Reis wrote:
| > | By the way, in that context, I'm puzzled by the way pp_cxx_expression
| > | deals with NON_DEPENDENT_EXPR. Is it calling itself or what?
| >
| > That is a bug.  It should be
| >
| >    pp_cxx_expression (pp, TREE_OPERAND (t, 0))
| >   
| Ok, I'm fixing this too at the same time.

Many thanks!

-- Gaby

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

* Re: [C++, diagnostic] PR 33494
  2007-11-01  1:41     ` Gabriel Dos Reis
  2007-11-01  2:00       ` Gabriel Dos Reis
@ 2007-11-01  2:13       ` Paolo Carlini
  2007-11-01  2:14         ` Gabriel Dos Reis
  1 sibling, 1 reply; 9+ messages in thread
From: Paolo Carlini @ 2007-11-01  2:13 UTC (permalink / raw)
  To: Gabriel Dos Reis; +Cc: Gcc Patch List

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

Hi Gaby,
> sorry for the delay.
>   
No problem.
> I was meaning to actually call pp_expression(), which indirectly calls
> pp_cxx_expression. 
>   
Ah, now I see...
> This part is OK, if you s/pp_cxx_expression/pp_expression/ and it
> passes regression tests.
>   
Excellent, the below is what I actually committed. Tested x86_64-linux.

Thanks,
Paolo.

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

[-- Attachment #2: CL_33494_3 --]
[-- Type: text/plain, Size: 559 bytes --]

/cp
2007-10-31  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33494
	* cxx-pretty-print.c (pp_cxx_typeid_expression,
	pp_cxx_delete_expression): Change to static linkage.
	* cxx-pretty-print.h: Adjust declarations.
	* error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
	MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
	MODOP_EXPR): Forward to pp_expression.

	* cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
	Fix typo.

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

	PR c++/33494
	* g++.dg/template/error35.C: New.

[-- Attachment #3: patch_33494_3 --]
[-- Type: text/plain, Size: 5022 bytes --]

Index: testsuite/g++.dg/template/error35.C
===================================================================
*** testsuite/g++.dg/template/error35.C	(revision 0)
--- testsuite/g++.dg/template/error35.C	(revision 0)
***************
*** 0 ****
--- 1,3 ----
+ // PR c++/33494
+ 
+ template<int> void foo(int(*f=0)()); // { dg-error "declared void|scope|erroneous-expression" }
Index: cp/error.c
===================================================================
*** cp/error.c	(revision 129768)
--- cp/error.c	(working copy)
*************** dump_expr (tree t, int flags)
*** 1873,1882 ****
        dump_decl (TEMPLATE_PARM_DECL (t), flags & ~TFF_DECL_SPECIFIERS);
        break;
  
-     case SCOPE_REF:
-       pp_expression (cxx_pp, t);
-       break;
- 
      case CAST_EXPR:
        if (TREE_OPERAND (t, 0) == NULL_TREE
  	  || TREE_CHAIN (TREE_OPERAND (t, 0)))
--- 1873,1878 ----
*************** dump_expr (tree t, int flags)
*** 2004,2014 ****
        dump_expr (TREE_OPERAND (t, 0), flags);
        break;
  
-     case EXPR_PACK_EXPANSION:
-       dump_expr (PACK_EXPANSION_PATTERN (t), flags);
-       pp_cxx_identifier (cxx_pp, "...");
-       break;
- 
      case ARGUMENT_PACK_SELECT:
        dump_template_argument (ARGUMENT_PACK_SELECT_FROM_PACK (t), flags);
        break;
--- 2000,2005 ----
*************** dump_expr (tree t, int flags)
*** 2040,2049 ****
        pp_cxx_trait_expression (cxx_pp, t);
        break;
  
-     case TYPEID_EXPR:
-       pp_cxx_typeid_expression (cxx_pp, t);
-       break;
- 
      case VA_ARG_EXPR:
        pp_cxx_va_arg_expression (cxx_pp, t);
        break;
--- 2031,2036 ----
*************** dump_expr (tree t, int flags)
*** 2052,2065 ****
        pp_cxx_offsetof_expression (cxx_pp, t);
        break;
  
      case MEMBER_REF:
      case DOTSTAR_EXPR:
-       pp_multiplicative_expression (cxx_pp, t);
-       break;
- 
      case DELETE_EXPR:
      case VEC_DELETE_EXPR:
!       pp_cxx_delete_expression (cxx_pp, t);
        break;
  
        /*  This list is incomplete, but should suffice for now.
--- 2039,2053 ----
        pp_cxx_offsetof_expression (cxx_pp, t);
        break;
  
+     case SCOPE_REF:
+     case EXPR_PACK_EXPANSION:
+     case TYPEID_EXPR:
      case MEMBER_REF:
      case DOTSTAR_EXPR:
      case DELETE_EXPR:
      case VEC_DELETE_EXPR:
!     case MODOP_EXPR:
!       pp_expression (cxx_pp, t);
        break;
  
        /*  This list is incomplete, but should suffice for now.
Index: cp/cxx-pretty-print.c
===================================================================
*** cp/cxx-pretty-print.c	(revision 129768)
--- cp/cxx-pretty-print.c	(working copy)
*************** static void pp_cxx_abstract_declarator (
*** 43,48 ****
--- 43,49 ----
  static void pp_cxx_statement (cxx_pretty_printer *, tree);
  static void pp_cxx_template_parameter (cxx_pretty_printer *, tree);
  static void pp_cxx_cast_expression (cxx_pretty_printer *, tree);
+ static void pp_cxx_typeid_expression (cxx_pretty_printer *, tree);
  \f
  
  static inline void
*************** pp_cxx_new_expression (cxx_pretty_printe
*** 672,678 ****
        ::(opt) delete cast-expression
        ::(opt) delete [ ] cast-expression   */
  
! void
  pp_cxx_delete_expression (cxx_pretty_printer *pp, tree t)
  {
    enum tree_code code = TREE_CODE (t);
--- 673,679 ----
        ::(opt) delete cast-expression
        ::(opt) delete [ ] cast-expression   */
  
! static void
  pp_cxx_delete_expression (cxx_pretty_printer *pp, tree t)
  {
    enum tree_code code = TREE_CODE (t);
*************** pp_cxx_expression (cxx_pretty_printer *p
*** 1064,1070 ****
  
      case NON_DEPENDENT_EXPR:
      case MUST_NOT_THROW_EXPR:
!       pp_cxx_expression (pp, t);
        break;
  
      case EXPR_PACK_EXPANSION:
--- 1065,1071 ----
  
      case NON_DEPENDENT_EXPR:
      case MUST_NOT_THROW_EXPR:
!       pp_cxx_expression (pp, TREE_OPERAND (t, 0));
        break;
  
      case EXPR_PACK_EXPANSION:
*************** pp_cxx_declaration (cxx_pretty_printer *
*** 2161,2167 ****
      }
  }
  
! void
  pp_cxx_typeid_expression (cxx_pretty_printer *pp, tree t)
  {
    t = TREE_OPERAND (t, 0);
--- 2162,2168 ----
      }
  }
  
! static void
  pp_cxx_typeid_expression (cxx_pretty_printer *pp, tree t)
  {
    t = TREE_OPERAND (t, 0);
Index: cp/cxx-pretty-print.h
===================================================================
*** cp/cxx-pretty-print.h	(revision 129768)
--- cp/cxx-pretty-print.h	(working copy)
*************** void pp_cxx_separate_with (cxx_pretty_pr
*** 70,78 ****
  void pp_cxx_declaration (cxx_pretty_printer *, tree);
  void pp_cxx_canonical_template_parameter (cxx_pretty_printer *, tree);
  void pp_cxx_trait_expression (cxx_pretty_printer *, tree);
- void pp_cxx_typeid_expression (cxx_pretty_printer *, tree);
  void pp_cxx_va_arg_expression (cxx_pretty_printer *, tree);
  void pp_cxx_offsetof_expression (cxx_pretty_printer *, tree);
- void pp_cxx_delete_expression (cxx_pretty_printer *, tree);
  
  #endif /* GCC_CXX_PRETTY_PRINT_H */
--- 70,76 ----

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

* Re: [C++, diagnostic] PR 33494
  2007-11-01  2:13       ` Paolo Carlini
@ 2007-11-01  2:14         ` Gabriel Dos Reis
  0 siblings, 0 replies; 9+ messages in thread
From: Gabriel Dos Reis @ 2007-11-01  2:14 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Gcc Patch List

On Thu, 1 Nov 2007, Paolo Carlini wrote:

| Excellent, the below is what I actually committed. Tested x86_64-linux.

Thanks!

-- Gaby

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

end of thread, other threads:[~2007-11-01  2:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-29 12:17 [C++, diagnostic] PR 33494 Paolo Carlini
2007-10-29 13:21 ` Gabriel Dos Reis
2007-10-29 14:25   ` Paolo Carlini
2007-11-01  1:41     ` Gabriel Dos Reis
2007-11-01  2:00       ` Gabriel Dos Reis
2007-11-01  2:04         ` Paolo Carlini
2007-11-01  2:04           ` Gabriel Dos Reis
2007-11-01  2:13       ` Paolo Carlini
2007-11-01  2:14         ` 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).