diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-03-28 09:26:28 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-03-28 09:26:28 +0000 |
commit | 9fd68c082693e2db323eee226f8f041a1a596cc9 (patch) | |
tree | 60bd2c4c9dd96be75e26bf7a55c401eb632b6850 /gcc/testsuite/g++.old-deja/g++.law/virtual3.C | |
parent | 9f9d16c921fcede880ddba43b970b29f0f888d8f (diff) |
Merge from mainlinebefore_gc_merge_990902egcs_gc_branch
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/egcs_gc_branch@26036 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.law/virtual3.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.law/virtual3.C | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.law/virtual3.C b/gcc/testsuite/g++.old-deja/g++.law/virtual3.C index d141f87ecb1..b3b753c1a91 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/virtual3.C +++ b/gcc/testsuite/g++.old-deja/g++.law/virtual3.C @@ -1,47 +1 @@ -// GROUPS passed virtual-functions -// virtual file -// From: allan@ramjet.multinet.DE (Allan Brighton) -// Subject: pos. bug in gcc-2.5.2 on hp -// Date: 4 Nov 1993 22:57:36 -0500 -// Message-ID: <9311041820.AA05942@ramjet.multinet.DE> - -#include <iostream.h> -#include <strstream.h> - - -class BugStream : public ostrstream { -public: - BugStream() {} - BugStream& eval(); -}; - - -static struct Eval_ { } eval; -BugStream& operator<<(ostream& os, Eval_); - -BugStream& BugStream::eval() -{ - // make sure str is null terminated - *this << ends; - - // eval the command and set the status - char* s = str(); - cerr << s << endl; - - // reset the stream for the next command - clear(0); - rdbuf()->freeze(0); - seekp(0); - - return *this; -} - -BugStream& operator<<(ostream& os, Eval_) -{ - return ((BugStream&)os).eval(); -} - -main() { - BugStream bs; - bs << "PASS" << eval; -} +int main() { |