This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++, diagnostic] PR 33843


Hi all, hi Gaby,

I have this patchlet for a small diagnostic issue. Tested x86_64-linux.

Ok for mainline?

Paolo.

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

	PR c++/33843
	* cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.

2007-10-25  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33843
	* g++.dg/template/error32.C: New.
Index: testsuite/g++.dg/template/error32.C
===================================================================
*** testsuite/g++.dg/template/error32.C	(revision 0)
--- testsuite/g++.dg/template/error32.C	(revision 0)
***************
*** 0 ****
--- 1,8 ----
+ // PR c++/33843
+ 
+ struct A {};
+ 
+ void foo(A* p())
+ {
+   p->A::~A(); // { dg-error "A::~A" }
+ }
Index: cp/cxx-pretty-print.c
===================================================================
*** cp/cxx-pretty-print.c	(revision 129623)
--- cp/cxx-pretty-print.c	(working copy)
*************** pp_cxx_unqualified_id (cxx_pretty_printe
*** 195,200 ****
--- 195,205 ----
        pp_cxx_unqualified_id (pp, TYPE_NAME (t));
        break;
  
+     case BIT_NOT_EXPR:
+       pp_cxx_complement (pp);
+       pp_cxx_unqualified_id (pp, TREE_OPERAND (t, 0));
+       break;
+ 
      case TEMPLATE_TYPE_PARM:
      case TEMPLATE_TEMPLATE_PARM:
        if (TYPE_IDENTIFIER (t))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]