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]

Testcase for fixed PR c++/2743


Applied.

+	g++.dg/lookup/exception1.C: New test.

Index: g++.dg/lookup/exception1.C
===================================================================
RCS file: g++.dg/lookup/exception1.C
diff -N g++.dg/lookup/exception1.C
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ g++.dg/lookup/exception1.C	1 Jan 2003 21:01:16 -0000
@@ -0,0 +1,33 @@
+/* PR 2743 */
+/* {dg-do compile} */
+
+namespace ns {
+  class Exception
+  {
+  };
+}
+
+namespace ns
+{
+  class Test {
+    public:
+      inline Test() throw( Exception );
+      inline Test(int n ) throw( Exception );
+    private:
+      int i;
+  };
+}
+
+// This line used to fail because Exception wasn't looked up in the
+// right scope.
+ns::Test::Test() throw( Exception ) : i( 1 )
+{
+}
+
+ns::Test::Test( int n ) throw( Exception ) : i( n )
+{
+}
+
+int main(int argc, char* argv) {
+  ns::Test test;
+}


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