OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.law / ctors17.C
1 // Build don't link: 
2 // GROUPS passed constructors
3 // ctor file
4 // Message-Id: <199306151813.gD28471@mail.Germany.EU.net>
5 // From: stephan@ifconnection.de (Stephan Muehlstrasser)
6 // Subject: gcc 2.4.3.1: illegal constructor call not rejected
7 // Date: Tue, 15 Jun 1993 18:34:14 +0200 (MET DST)
8
9
10 #include <fstream.h>
11
12 class X : public ifstream {
13     public:
14       X(int a, char *b) {} // ERROR - candidate
15 }; // ERROR - candidate
16 main()
17 {
18     X *y = new X(10, "123");
19     // the compiler must reject this constructor call:
20     X *x = new X("abc");// ERROR - .*
21 }