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]

Re: C++ PATCH: Fix pr-2202


Neil Booth <neil@daikokuya.demon.co.uk> writes:

| Gabriel Dos Reis wrote:-
| 
| > 
| > This patchlet fixes pr-2202 where we failed to diagnose use of object
| > of abstract class type in throw-expresion.  As mentioned in the
| > bug-report that is a regression over gcc-2.8.2 which correctly
| > rejected the program.
| > 
| > Boostrapped and tested on i686-pc-linux-gnu, no regression.
| > OK to install on both branch and mainline?
|  
| No testcase?

Certainly: pr-2202 itself :-)

     class foo {
     public:
       foo() {};
       void throwMe () {
	  throw *this;
       };
       virtual void test () = 0;
     };

-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com

2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>

	* g++.old-deja/g++.other/eh4.C: New test

Index: g++.old-deja/g++.other/eh4.C
===================================================================
RCS file: eh4.C
diff -N eh4.C
*** /dev/null	Tue May  5 13:32:27 1998
--- eh4.C	Wed Mar 14 16:15:54 2001
***************
*** 0 ****
--- 1,12 ----
+ // Origin: Jean-Marc Bourguet <bourguet@cadence.com>
+ // Build, don't link:
+ 
+ class foo {
+ public:
+   foo() {};
+   void throwMe () {
+     throw *this;		// ERROR
+   };
+   virtual void test () = 0;
+ };
+ 


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