X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.law%2Fvisibility17.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.law%2Fvisibility17.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=2aa08a09169edf34bf631299c00c8c48299ad2e2;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility17.C b/gcc/testsuite/g++.old-deja/g++.law/visibility17.C deleted file mode 100644 index 2aa08a09..00000000 --- a/gcc/testsuite/g++.old-deja/g++.law/visibility17.C +++ /dev/null @@ -1,66 +0,0 @@ -// Build don't link: -// GROUPS passed visibility -// visibility file -// From: Sandeep Shroff -// Date: Thu, 05 Aug 1993 17:23:20 -0700 -// Subject: Access to private constructor. -// Message-ID: <9308060023.AA10283@neptune.caere.com> -#include -#include - -class Base -{ -public: - char* getName() {return name_;} - -private: - Base(); - Base(char* str); - - char* name_; -}; - -class Derived : public Base -{ -public: - Derived(int n, char* str); - Derived(int n); - - int getNum() {return num_;} -private: - int num_; -}; - -Base::Base() -{ // ERROR - private - name_ = std::strcpy(new char[std::strlen(" ") + 1], " "); -} - -Base::Base(char* str) -{ // ERROR - private - if(str != NULL) - name_ = std::strcpy(new char[std::strlen(str) + 1], str); -} - -Derived::Derived(int n, char* str) : Base(str) -{// ERROR - .* - num_ = n; -} - -Derived::Derived(int n) : Base() -{// ERROR - .* - num_ = n; -} - - - -int main() -{ - // Derived* d = new Derived(10, "test"); - Derived* d = new Derived(10); - - std::cerr << d->getNum() << "\t" << d->getName() << std::endl; -} - - -