diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.law/cvt2.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.law/cvt2.C | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.law/cvt2.C b/gcc/testsuite/g++.old-deja/g++.law/cvt2.C deleted file mode 100644 index 4c28a7e6bd0..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.law/cvt2.C +++ /dev/null @@ -1,42 +0,0 @@ -// GROUPS passed conversions -#include <stdio.h> -#include <stdlib.h> -#include <iostream.h> -#include <fstream.h> - -extern "C" { -int strncmp (const char *, const char *, size_t); -} - -class cvec { -public: - ~cvec(){ delete s; } - cvec(const char*x) { s = new char[strlen(x)+1]; strcpy(s, x); } - cvec(const cvec& c) { s = new char[strlen(c.s)+1]; strcpy(s, c.s); } - operator const char*() { return s; } -private: - char *s; -}; - -cvec -B(const char* a) -{ - return a; -} - -void -A(const char* s) -{ - // s still ok here - ifstream inf(s); - if (strncmp ("aaa", s, 3)) - printf ("FAIL\n"); - else - printf ("PASS\n"); -} - -int main() -{ - A(B("aaa")); -} - |