[g++] update deprecated bits in testsuites.
Benjamin Kosnik
bkoz@redhat.com
Fri Apr 6 14:54:00 GMT 2001
Ok, I finally did this.
2001-04-06 Benjamin Kosnik <bkoz@redhat.com
* g++.old-deja/g++.robertl/eb79.C: Same.
* g++.old-deja/g++.robertl/eb77.C (main): Same.
* g++.old-deja/g++.robertl/eb73.C: Same.
* g++.old-deja/g++.robertl/eb66.C (main): Same.
* g++.old-deja/g++.robertl/eb55.C (t): Same.
* g++.old-deja/g++.robertl/eb54.C (main): Same.
* g++.old-deja/g++.robertl/eb46.C (main): Same.
* g++.old-deja/g++.robertl/eb44.C: Same.
* g++.old-deja/g++.robertl/eb41.C (main): Same.
* g++.old-deja/g++.robertl/eb4.C (main): Same.
* g++.old-deja/g++.robertl/eb39.C: Same.
* g++.old-deja/g++.robertl/eb33.C (main): Same.
* g++.old-deja/g++.robertl/eb31.C (main): Same.
* g++.old-deja/g++.robertl/eb30.C: Same.
* g++.old-deja/g++.robertl/eb3.C: Same.
* g++.old-deja/g++.robertl/eb24.C (T>): Same.
* g++.old-deja/g++.robertl/eb21.C: Same.
* g++.old-deja/g++.robertl/eb15.C: Same.
* g++.old-deja/g++.robertl/eb118.C: Same.
* g++.old-deja/g++.robertl/eb115.C (main): Same.
* g++.old-deja/g++.robertl/eb113.C (streambuf): Same.
* g++.old-deja/g++.robertl/eb109.C: Same.
* g++.old-deja/g++.other/sibcall1.C (main): Same.
* g++.old-deja/g++.mike/rtti1.C: Same.
* g++.old-deja/g++.mike/p658.C: Same.
* g++.old-deja/g++.mike/net46.C: Same.
* g++.old-deja/g++.mike/net34.C: Same.
* g++.old-deja/g++.mike/memoize1.C: Same.
* g++.old-deja/g++.mike/eh2.C: Same.
* g++.old-deja/g++.law/weak.C: Same.
* g++.old-deja/g++.law/visibility7.C: Same.
* g++.old-deja/g++.law/visibility25.C: Same.
* g++.old-deja/g++.law/visibility22.C: Same.
* g++.old-deja/g++.law/visibility2.C: Same.
* g++.old-deja/g++.law/visibility17.C: Same.
* g++.old-deja/g++.law/visibility13.C: Same.
* g++.old-deja/g++.law/visibility10.C: Same.
* g++.old-deja/g++.law/visibility1.C: Same.
* g++.old-deja/g++.law/virtual3.C (eval): Same.
* g++.old-deja/g++.law/vbase1.C: Same.
* g++.old-deja/g++.law/operators32.C: Same.
* g++.old-deja/g++.law/nest3.C: Same.
* g++.old-deja/g++.law/missed-error2.C (foo): Same.
* g++.old-deja/g++.law/except5.C (main): Same.
* g++.old-deja/g++.law/cvt7.C (run): Same.
* g++.old-deja/g++.law/cvt2.C: Same.
* g++.old-deja/g++.law/cvt16.C: Same.
* g++.old-deja/g++.law/ctors6.C (bar): Same.
* g++.old-deja/g++.law/ctors17.C (main): Same.
* g++.old-deja/g++.law/ctors13.C: Same.
* g++.old-deja/g++.law/ctors12.C (main): Same.
* g++.old-deja/g++.law/ctors10.C: Same.
* g++.old-deja/g++.law/code-gen5.C: Same.
* g++.old-deja/g++.law/bad-error7.C: Same.
* g++.old-deja/g++.law/arm9.C: Same.
* g++.old-deja/g++.law/arm12.C: Same.
* g++.old-deja/g++.law/arg8.C: Same.
* g++.old-deja/g++.law/arg1.C: Same.
* g++.old-deja/g++.jason/typeid1.C (struct foo): Same.
* g++.old-deja/g++.jason/template31.C: Same.
* g++.old-deja/g++.jason/template24.C (main): Same.
* g++.old-deja/g++.jason/2371.C: Same.
* g++.old-deja/g++.eh/new2.C: Same.
* g++.old-deja/g++.eh/new1.C: Same.
* g++.old-deja/g++.brendan/ptolemy2.C: Same.
* g++.old-deja/g++.brendan/nest21.C (main): Same.
* g++.old-deja/g++.brendan/err-msg3.C: Same.
* g++.old-deja/g++.brendan/crash62.C: Same.
* g++.old-deja/g++.brendan/crash52.C: Same.
* g++.old-deja/g++.brendan/crash49.C (main): Same.
* g++.old-deja/g++.brendan/crash38.C: Same.
* g++.old-deja/g++.brendan/crash15.C (main): Same.
* g++.old-deja/g++.brendan/copy9.C: Same.
* g++.old-deja/g++.benjamin/15071.C (main): Update to conformant
headers.
Index: testsuite/g++.old-deja/g++.benjamin/15071.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/15071.C,v
retrieving revision 1.2
diff -c -p -r1.2 15071.C
*** 15071.C 1998/12/16 21:21:46 1.2
--- 15071.C 2001/04/06 21:51:41
***************
*** 2,11 ****
// g++/15071
// gcc invocation fails to link in libstdc++
! #include <iostream.h>
int main() {
! cout<<"hi"<<endl;
return 0;
}
--- 2,11 ----
// g++/15071
// gcc invocation fails to link in libstdc++
! #include <iostream>
int main() {
! std::cout << "hi" << std::endl;
return 0;
}
Index: testsuite/g++.old-deja/g++.brendan/copy9.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.brendan/copy9.C,v
retrieving revision 1.4
diff -c -p -r1.4 copy9.C
*** copy9.C 2000/08/22 18:16:12 1.4
--- copy9.C 2001/04/06 21:51:41
***************
*** 1,5 ****
// GROUPS passed copy-ctors
! #include <iostream.h>
// token types: from state parser
const int T_EOF = 257;
--- 1,5 ----
// GROUPS passed copy-ctors
! #include <iostream>
// token types: from state parser
const int T_EOF = 257;
*************** main () {
*** 35,44 ****
ParseToken b(a);
if (b.doubleval == 23.2)
! cout << "PASS\n";
else
{
! cout << "FAIL\n";
return 1;
}
}
--- 35,45 ----
ParseToken b(a);
if (b.doubleval == 23.2)
! std::cout << "PASS\n";
else
{
! std::cout << "FAIL\n";
return 1;
}
}
+
Index: testsuite/g++.old-deja/g++.brendan/crash15.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash15.C,v
retrieving revision 1.3
diff -c -p -r1.3 crash15.C
*** crash15.C 1998/12/16 21:23:25 1.3
--- crash15.C 2001/04/06 21:51:41
***************
*** 1,22 ****
// Build don't link:
// GROUPS passed old-abort
! #include <iostream.h>
class A {
public:
! virtual ~A() {cout << "executed ~A()\n";};
};
class B : public A {
public:
! virtual ~B() {cout << "executed ~B()\n";};
};
int
main() {
! cout << "starting\n";
B b;
b.~A();// ERROR - destructor
! cout << "done\n";
};
--- 1,22 ----
// Build don't link:
// GROUPS passed old-abort
! #include <iostream>
class A {
public:
! virtual ~A() {std::cout << "executed ~A()\n";};
};
class B : public A {
public:
! virtual ~B() {std::cout << "executed ~B()\n";};
};
int
main() {
! std::cout << "starting\n";
B b;
b.~A();// ERROR - destructor
! std::cout << "done\n";
};
Index: testsuite/g++.old-deja/g++.brendan/crash38.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash38.C,v
retrieving revision 1.3
diff -c -p -r1.3 crash38.C
*** crash38.C 1998/12/16 21:23:50 1.3
--- crash38.C 2001/04/06 21:51:42
***************
*** 8,14 ****
main.cc: Please report this to 'bug-g++@prep.ai.mit.edu'
*/
! #include <stream.h>
class INTEGER {
int x;
--- 8,14 ----
main.cc: Please report this to 'bug-g++@prep.ai.mit.edu'
*/
! #include <iostream>
class INTEGER {
int x;
*************** public:
*** 16,22 ****
typedef int BASE;
INTEGER(int y) : x(y) {}
INTEGER() {}
! void encode() { cout << "Integer encoder";}
int operator=(int y) { x=y; return x; }
operator int() {return x; }
};
--- 16,22 ----
typedef int BASE;
INTEGER(int y) : x(y) {}
INTEGER() {}
! void encode() { std::cout << "Integer encoder";}
int operator=(int y) { x=y; return x; }
operator int() {return x; }
};
Index: testsuite/g++.old-deja/g++.brendan/crash49.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash49.C,v
retrieving revision 1.3
diff -c -p -r1.3 crash49.C
*** crash49.C 1998/12/16 21:24:03 1.3
--- crash49.C 2001/04/06 21:51:42
***************
*** 1,12 ****
// Build don't link:
// GROUPS passed old-abort
! #include<iostream.h>
const int keys = 10;
const int key[keys] = {6, key[1], 2, keys, 1, 7, 6, key[2], key[8]};
void main()
{ // ERROR - return type for main
! for(int i = 0; i < keys;) cout << key[i++] << " ";
! endl(cout);
}
--- 1,12 ----
// Build don't link:
// GROUPS passed old-abort
! #include<iostream>
const int keys = 10;
const int key[keys] = {6, key[1], 2, keys, 1, 7, 6, key[2], key[8]};
void main()
{ // ERROR - return type for main
! for(int i = 0; i < keys;) std::cout << key[i++] << " ";
! std::endl(std::cout);
}
Index: testsuite/g++.old-deja/g++.brendan/crash52.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C,v
retrieving revision 1.3
diff -c -p -r1.3 crash52.C
*** crash52.C 2000/10/07 01:44:36 1.3
--- crash52.C 2001/04/06 21:51:42
***************
*** 1,7 ****
// Build don't link:
// GROUPS passed old-abort
// Special g++ Options: -Wreturn-type
! #include <iostream.h>
class A {
public:
--- 1,7 ----
// Build don't link:
// GROUPS passed old-abort
// Special g++ Options: -Wreturn-type
! #include <iostream>
class A {
public:
*************** public:
*** 9,14 ****
};
A &f(A &a) {// ERROR - new decl.*
! cout << "Blah\n";
} // ERROR - non-void function
--- 9,14 ----
};
A &f(A &a) {// ERROR - new decl.*
! std::cout << "Blah\n";
} // ERROR - non-void function
Index: testsuite/g++.old-deja/g++.brendan/crash62.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash62.C,v
retrieving revision 1.2
diff -c -p -r1.2 crash62.C
*** crash62.C 1998/12/16 21:24:19 1.2
--- crash62.C 2001/04/06 21:51:42
***************
*** 1,11 ****
// Build don't link:
// GROUPS passed old-abort
! #include <iostream.h>
void
! fubar(ostream* out, const char* string)
{
! (*out) << string << endl;
return;
}
--- 1,11 ----
// Build don't link:
// GROUPS passed old-abort
! #include <iostream>
void
! fubar(std::ostream* out, const char* s)
{
! (*out) << s << std::endl;
return;
}
***************
*** 14,21 ****
{
// Declare a ref and a pointer to the same ostream.
//
! ostream* out = &cerr;
! ostream& die = cerr;
// Valid call to fubar.
//
--- 14,21 ----
{
// Declare a ref and a pointer to the same ostream.
//
! std::ostream* out = &std::cerr;
! std::ostream& die = std::cerr;
// Valid call to fubar.
//
***************
*** 30,32 ****
--- 30,41 ----
return 1;
}
+
+
+
+
+
+
+
+
+
Index: testsuite/g++.old-deja/g++.brendan/cvt1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C,v
retrieving revision 1.2
diff -c -p -r1.2 cvt1.C
*** cvt1.C 1998/12/16 21:24:32 1.2
--- cvt1.C 2001/04/06 21:51:42
***************
*** 1,6 ****
// Build don't link:
// GROUPS passed conversions
! #include <iostream.h>
class Thing
{
--- 1,6 ----
// Build don't link:
// GROUPS passed conversions
! #include <iostream>
class Thing
{
*************** main (int argc, char** argv)
*** 39,44 ****
Group g (Group::THIS_GROUP) ;
g += new Thing (Thing::GOOD_THING) ;
! cout << "Group type is " << (Group::GroupType) g << endl ;
return 0 ;
}
--- 39,47 ----
Group g (Group::THIS_GROUP) ;
g += new Thing (Thing::GOOD_THING) ;
! std::cout << "Group type is " << (Group::GroupType) g << std::endl ;
return 0 ;
}
+
+
+
Index: testsuite/g++.old-deja/g++.brendan/err-msg3.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.brendan/err-msg3.C,v
retrieving revision 1.2
diff -c -p -r1.2 err-msg3.C
*** err-msg3.C 1998/12/16 21:25:06 1.2
--- err-msg3.C 2001/04/06 21:51:42
***************
*** 1,7 ****
// Build don't link:
// GROUPS passed error-messages
! #include <fstream.h>
! #include <iomanip.h>
// This error should not appear:
// bug.C: In method `test::test(const class test &)':
--- 1,7 ----
// Build don't link:
// GROUPS passed error-messages
! #include <fstream>
! #include <iomanip>
// This error should not appear:
// bug.C: In method `test::test(const class test &)':
Index: testsuite/g++.old-deja/g++.brendan/nest21.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.brendan/nest21.C,v
retrieving revision 1.5
diff -c -p -r1.5 nest21.C
*** nest21.C 2000/08/22 18:16:12 1.5
--- nest21.C 2001/04/06 21:51:43
***************
*** 1,7 ****
// GROUPS passed nested-classes
! #include <iostream.h>
! #include <stdio.h>
! #include <string.h>
static char output[1024];
--- 1,7 ----
// GROUPS passed nested-classes
! #include <iostream>
! #include <cstdio>
! #include <cstring>
static char output[1024];
*************** public:
*** 32,75 ****
BDDRetrace::Dump&
BDDRetrace::Dump1::operator<<(char c)
{ char tempout[1024];
! sprintf (tempout, "%s%s%c", output, "1-", c);
! strcpy (output, tempout);
return *this;
}
BDDRetrace::Dump&
BDDRetrace::Dump1::operator<<(int i)
{ char tempout[1024];
! sprintf (tempout, "%s%s%d", output, "1-", i);
! strcpy (output, tempout);
return *this; }
BDDRetrace::Dump&
BDDRetrace::Dump1::operator<<(double r)
{ char tempout[1024];
! sprintf (tempout, "%s%s%1.0f", output, "1-", r);
! strcpy (output, tempout);
return *this; }
BDDRetrace::Dump&
Dump2::operator<<(char c)
{ char tempout[1024];
! sprintf (tempout, "%s%s%c", output, "2-", c);
! strcpy (output, tempout);
return *this; }
BDDRetrace::Dump&
Dump2::operator<<(int i)
{ char tempout[1024];
! sprintf (tempout, "%s%s%d", output, "2-", i);
! strcpy (output, tempout);
return *this; }
BDDRetrace::Dump&
Dump2::operator<<(double r)
{ char tempout[1024];
! sprintf (tempout, "%s%s%1.0f", output, "2-", r);
! strcpy (output, tempout);
return *this; }
int main()
--- 32,75 ----
BDDRetrace::Dump&
BDDRetrace::Dump1::operator<<(char c)
{ char tempout[1024];
! std::sprintf(tempout, "%s%s%c", output, "1-", c);
! std::strcpy(output, tempout);
return *this;
}
BDDRetrace::Dump&
BDDRetrace::Dump1::operator<<(int i)
{ char tempout[1024];
! std::sprintf (tempout, "%s%s%d", output, "1-", i);
! std::strcpy (output, tempout);
return *this; }
BDDRetrace::Dump&
BDDRetrace::Dump1::operator<<(double r)
{ char tempout[1024];
! std::sprintf (tempout, "%s%s%1.0f", output, "1-", r);
! std::strcpy (output, tempout);
return *this; }
BDDRetrace::Dump&
Dump2::operator<<(char c)
{ char tempout[1024];
! std::sprintf (tempout, "%s%s%c", output, "2-", c);
! std::strcpy (output, tempout);
return *this; }
BDDRetrace::Dump&
Dump2::operator<<(int i)
{ char tempout[1024];
! std::sprintf (tempout, "%s%s%d", output, "2-", i);
! std::strcpy (output, tempout);
return *this; }
BDDRetrace::Dump&
Dump2::operator<<(double r)
{ char tempout[1024];
! std::sprintf (tempout, "%s%s%1.0f", output, "2-", r);
! std::strcpy (output, tempout);
return *this; }
int main()
*************** int main()
*** 77,83 ****
BDDRetrace::Dump1 d1;
Dump2 d2;
! sprintf (output, " ");
d1 << 'a';
d1 << 1;
--- 77,83 ----
BDDRetrace::Dump1 d1;
Dump2 d2;
! std::sprintf (output, " ");
d1 << 'a';
d1 << 1;
*************** int main()
*** 87,96 ****
d2 << 1;
d2 << 1.0;
! if (strcmp (output, " 1-a1-11-12-a2-12-1") == 0)
! printf ("PASS\n");
else
! { printf ("FAIL\n"); return 1; }
return 0;
}
--- 87,96 ----
d2 << 1;
d2 << 1.0;
! if (std::strcmp (output, " 1-a1-11-12-a2-12-1") == 0)
! std::printf ("PASS\n");
else
! { std::printf ("FAIL\n"); return 1; }
return 0;
}
Index: testsuite/g++.old-deja/g++.brendan/ptolemy2.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.brendan/ptolemy2.C,v
retrieving revision 1.4
diff -c -p -r1.4 ptolemy2.C
*** ptolemy2.C 2000/08/22 18:16:12 1.4
--- ptolemy2.C 2001/04/06 21:51:44
***************
*** 1,5 ****
// GROUPS passed ptolemy-bugs
! #include <iostream.h>
class PTcl {
public:
--- 1,5 ----
// GROUPS passed ptolemy-bugs
! #include <iostream>
class PTcl {
public:
*************** void printargs(char** argv) {
*** 45,63 ****
}
int PTcl::one(int, char** argv) {
! cout << "FAIL\n";
printargs(argv);
return 1;
}
int PTcl::two(int, char** argv) {
! cout << "PASS\n";
printargs(argv);
return 0;
}
int PTcl::three(int, char** argv) {
! cout << "FAIL\n";
printargs(argv);
return 1;
}
--- 45,63 ----
}
int PTcl::one(int, char** argv) {
! std::cout << "FAIL\n";
printargs(argv);
return 1;
}
int PTcl::two(int, char** argv) {
! std::cout << "PASS\n";
printargs(argv);
return 0;
}
int PTcl::three(int, char** argv) {
! std::cout << "FAIL\n";
printargs(argv);
return 1;
}
Index: testsuite/g++.old-deja/g++.eh/new1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.eh/new1.C,v
retrieving revision 1.3
diff -c -p -r1.3 new1.C
*** new1.C 1998/12/16 21:30:00 1.3
--- new1.C 2001/04/06 21:51:45
***************
*** 1,8 ****
// Test that a throw in foo destroys the A, but does not free the memory.
! #include <stddef.h>
! #include <stdlib.h>
! #include <new.h>
struct A {
A();
--- 1,8 ----
// Test that a throw in foo destroys the A, but does not free the memory.
! #include <cstddef>
! #include <cstdlib>
! #include <new>
struct A {
A();
*************** void foo (B*) { throw 1; }
*** 34,44 ****
void* operator new (size_t size) throw (std::bad_alloc)
{
++newed;
! return (void *) malloc (size);
}
void operator delete (void *p) throw ()
{
--newed;
! free (p);
}
--- 34,48 ----
void* operator new (size_t size) throw (std::bad_alloc)
{
++newed;
! return (void *) std::malloc (size);
}
void operator delete (void *p) throw ()
{
--newed;
! std::free (p);
}
+
+
+
+
Index: testsuite/g++.old-deja/g++.eh/new2.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.eh/new2.C,v
retrieving revision 1.4
diff -c -p -r1.4 new2.C
*** new2.C 1999/03/23 00:53:39 1.4
--- new2.C 2001/04/06 21:51:45
***************
*** 1,8 ****
// Test that a throw in B's constructor destroys the A and frees the memory.
! #include <stddef.h>
! #include <stdlib.h>
! #include <new.h>
struct A {
A();
--- 1,8 ----
// Test that a throw in B's constructor destroys the A and frees the memory.
! #include <cstddef>
! #include <cstdlib>
! #include <new>
struct A {
A();
*************** void foo (B*) { }
*** 35,41 ****
void* operator new (size_t size) throw (std::bad_alloc)
{
++newed;
! return (void *) malloc (size);
}
void operator delete (void *p) throw ()
--- 35,41 ----
void* operator new (size_t size) throw (std::bad_alloc)
{
++newed;
! return (void *) std::malloc (size);
}
void operator delete (void *p) throw ()
*************** void operator delete (void *p) throw ()
*** 43,45 ****
--- 43,46 ----
--newed;
free (p);
}
+
Index: testsuite/g++.old-deja/g++.jason/2371.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.jason/2371.C,v
retrieving revision 1.6
diff -c -p -r1.6 2371.C
*** 2371.C 2001/02/07 06:27:49 1.6
--- 2371.C 2001/04/06 21:51:46
***************
*** 7,18 ****
// Wendell Baker, Berkeley CAD Group, 1993 (wbaker@ic.Berkeley.EDU)
//
-
#pragma implementation "ListS.h"
#pragma implementation "SetLS.h"
! #include <stdlib.h>
! #include <iostream.h>
# 1 "../../templates/SetLS.h" 1
// -*- C++ -*-
--- 7,18 ----
// Wendell Baker, Berkeley CAD Group, 1993 (wbaker@ic.Berkeley.EDU)
//
#pragma implementation "ListS.h"
#pragma implementation "SetLS.h"
! #include <cstdlib>
! #include <iostream>
! using namespace std;
# 1 "../../templates/SetLS.h" 1
// -*- C++ -*-
Index: testsuite/g++.old-deja/g++.jason/template24.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.jason/template24.C,v
retrieving revision 1.3
diff -c -p -r1.3 template24.C
*** template24.C 1998/12/16 21:37:25 1.3
--- template24.C 2001/04/06 21:51:47
***************
*** 1,6 ****
// Bug: g++ doesn't find the conversion from ostream_withassign to ostream.
! #include <iostream.h>
template <class T>
struct A {
--- 1,6 ----
// Bug: g++ doesn't find the conversion from ostream_withassign to ostream.
! #include <iostream>
template <class T>
struct A {
*************** struct A {
*** 8,14 ****
};
template <class T>
! ostream & operator<< (ostream & os, A<T> & a)
{
os << a.t;
return os;
--- 8,14 ----
};
template <class T>
! std::ostream & operator<< (std::ostream & os, A<T> & a)
{
os << a.t;
return os;
*************** ostream & operator<< (ostream & os, A<T>
*** 17,21 ****
int main ()
{
A<int> a = { 1 };
! cout << a << endl;
}
--- 17,22 ----
int main ()
{
A<int> a = { 1 };
! std::cout << a << std::endl;
}
+
Index: testsuite/g++.old-deja/g++.jason/template31.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.jason/template31.C,v
retrieving revision 1.5
diff -c -p -r1.5 template31.C
*** template31.C 2000/06/12 23:48:11 1.5
--- template31.C 2001/04/06 21:51:47
***************
*** 1,6 ****
// PRMS Id: 8569
! #include <iostream.h>
#include <vector>
using std::vector;
--- 1,6 ----
// PRMS Id: 8569
! #include <iostream>
#include <vector>
using std::vector;
*************** private:
*** 33,42 ****
int main(int argc, char**argv) {
IncludeIt foo;
IncludeIt* bar;
! exit(0);
}
template class std::__malloc_alloc_template<0>;
#ifndef __USE_MALLOC
template class std::__default_alloc_template<false, 0>;
#endif
--- 33,47 ----
int main(int argc, char**argv) {
IncludeIt foo;
IncludeIt* bar;
! std::exit(0);
}
template class std::__malloc_alloc_template<0>;
#ifndef __USE_MALLOC
template class std::__default_alloc_template<false, 0>;
#endif
+
+
+
+
+
Index: testsuite/g++.old-deja/g++.jason/typeid1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C,v
retrieving revision 1.4
diff -c -p -r1.4 typeid1.C
*** typeid1.C 1998/12/16 21:38:21 1.4
--- typeid1.C 2001/04/06 21:51:47
***************
*** 1,11 ****
#include <typeinfo>
! #include <iostream.h>
struct foo { double f(int); };
int main() {
double f (int);
const std::type_info &r = typeid (f);
! cout << typeid(f).name() << endl;
! cout << typeid(foo::f).name() << endl;
}
--- 1,11 ----
#include <typeinfo>
! #include <iostream>
struct foo { double f(int); };
int main() {
double f (int);
const std::type_info &r = typeid (f);
! std::cout << typeid(f).name() << std::endl;
! std::cout << typeid(foo::f).name() << std::endl;
}
Index: testsuite/g++.old-deja/g++.law/arg1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/arg1.C,v
retrieving revision 1.3
diff -c -p -r1.3 arg1.C
*** arg1.C 1998/12/16 21:38:44 1.3
--- arg1.C 2001/04/06 21:51:47
***************
*** 5,22 ****
// From: kondo@akane.mech.ibaraki.ac.jp
// Date: Fri, 04 Sep 92 17:41:05 JST
! #include <iostream.h>
// check the order of declarations
class A {
public:
! void f(double* p) { cout << "A(double*)\n"; } // ERROR - candidate
! void f(int* p) { cout << "A(int*)\n"; } // ERROR - candidate
};
class B {
public:
! void f(int* p) { cout << "B(int*)\n"; } // ERROR - candidate
! void f(double* p) { cout << "B(double*)\n"; } // ERROR - candidate
};
int main()
--- 5,22 ----
// From: kondo@akane.mech.ibaraki.ac.jp
// Date: Fri, 04 Sep 92 17:41:05 JST
! #include <iostream>
// check the order of declarations
class A {
public:
! void f(double* p) { std::cout << "A(double*)\n"; } // ERROR - candidate
! void f(int* p) { std::cout << "A(int*)\n"; } // ERROR - candidate
};
class B {
public:
! void f(int* p) { std::cout << "B(int*)\n"; } // ERROR - candidate
! void f(double* p) { std::cout << "B(double*)\n"; } // ERROR - candidate
};
int main()
*************** int main()
*** 27,29 ****
--- 27,30 ----
a.f(0);// ERROR - .*
b.f(0);// ERROR - .*
}
+
Index: testsuite/g++.old-deja/g++.law/arg8.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/arg8.C,v
retrieving revision 1.2
diff -c -p -r1.2 arg8.C
*** arg8.C 1998/12/16 21:38:53 1.2
--- arg8.C 2001/04/06 21:51:47
***************
*** 6,27 ****
// Date: Thu, 8 Jul 93 11:47:28 MDT
! #include <iostream.h>
! #include <stdio.h>
// With this declaration the program will not link.
! template <class Type> ostream & save(ostream & os, Type T);
! template <class Type> ostream &
! save(ostream & os, Type T) {
return os << T;
} // save
int
main() {
int i = 10;
! save((ostream &)cout, i) << endl;
short int s = 5;
! save((ostream &)cout, s) << endl;
! printf ("PASS\n");
} // main
--- 6,27 ----
// Date: Thu, 8 Jul 93 11:47:28 MDT
! #include <iostream>
! #include <cstdio>
// With this declaration the program will not link.
! template <class Type> std::ostream & save(std::ostream & os, Type T);
! template <class Type> std::ostream &
! save(std::ostream & os, Type T) {
return os << T;
} // save
int
main() {
int i = 10;
! save((std::ostream &)std::cout, i) << std::endl;
short int s = 5;
! save((std::ostream &)std::cout, s) << std::endl;
! std::printf ("PASS\n");
} // main
Index: testsuite/g++.old-deja/g++.law/arm12.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/arm12.C,v
retrieving revision 1.2
diff -c -p -r1.2 arm12.C
*** arm12.C 1998/12/16 21:38:58 1.2
--- arm12.C 2001/04/06 21:51:48
***************
*** 5,11 ****
// Subject: Bad access control with private constructor and derivation
// Date: Fri, 28 May 1993 12:39:57 -0400 (EDT)
! #include <iostream.h>
class X
{
--- 5,11 ----
// Subject: Bad access control with private constructor and derivation
// Date: Fri, 28 May 1993 12:39:57 -0400 (EDT)
! #include <iostream>
class X
{
*************** public:
*** 24,40 ****
X::X()
{// ERROR - .*
! cout << "X::X()" << endl;
}
void X::f()
{
! cout << "X::f()" << endl;
}
Y::Y()
{// ERROR - within this
! cout << "Y::Y()" << endl;
}
--- 24,40 ----
X::X()
{// ERROR - .*
! std::cout << "X::X()" << std::endl;
}
void X::f()
{
! std::cout << "X::f()" << std::endl;
}
Y::Y()
{// ERROR - within this
! std::cout << "Y::Y()" << std::endl;
}
*************** int main()
*** 43,47 ****
--- 43,49 ----
Y y;
y.f();
}
+
+
Index: testsuite/g++.old-deja/g++.law/arm9.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/arm9.C,v
retrieving revision 1.3
diff -c -p -r1.3 arm9.C
*** arm9.C 1998/12/16 21:39:11 1.3
--- arm9.C 2001/04/06 21:51:48
***************
*** 1,6 ****
// Build don't link:
// GROUPS passed ARM-compliance
! #include <iostream.h>
enum f1 {
F1
};
--- 1,6 ----
// Build don't link:
// GROUPS passed ARM-compliance
! #include <iostream>
enum f1 {
F1
};
*************** class A {
*** 13,25 ****
public:
void set (f1 f);
};
! void A::set (f1 f) { cout << "called A f1\n";}
class B : public A {
public:
void set (f2 f);
};
! void B::set (f2 f) { cout << "called B\n";} // ERROR - candidate
int main() {
B b;
--- 13,25 ----
public:
void set (f1 f);
};
! void A::set (f1 f) { std::cout << "called A f1\n";}
class B : public A {
public:
void set (f2 f);
};
! void B::set (f2 f) { std::cout << "called B\n";} // ERROR - candidate
int main() {
B b;
*************** int main() {
*** 31,33 ****
--- 31,38 ----
// belong to different scopes. Thus B::set() should have
// hidden (completely) the A::set() function.
}
+
+
+
+
+
Index: testsuite/g++.old-deja/g++.law/bad-error7.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/bad-error7.C,v
retrieving revision 1.3
diff -c -p -r1.3 bad-error7.C
*** bad-error7.C 1998/12/16 21:39:18 1.3
--- bad-error7.C 2001/04/06 21:51:48
***************
*** 1,6 ****
// Build don't link:
// GROUPS passed bad-errors
! #include <iostream.h>
class ParX
{
--- 1,6 ----
// Build don't link:
// GROUPS passed bad-errors
! #include <iostream>
class ParX
{
*************** class ParX
*** 11,17 ****
class X : public ParX
{
public:
! void fn2() { cout << "hi" << endl; }
};
int main()
--- 11,17 ----
class X : public ParX
{
public:
! void fn2() { std::cout << "hi" << std::endl; }
};
int main()
*************** int main()
*** 22,24 ****
--- 22,30 ----
(pParX->*p)();
}
+
+
+
+
+
+
Index: testsuite/g++.old-deja/g++.law/code-gen5.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/code-gen5.C,v
retrieving revision 1.4
diff -c -p -r1.4 code-gen5.C
*** code-gen5.C 2000/08/22 18:16:12 1.4
--- code-gen5.C 2001/04/06 21:51:48
***************
*** 5,16 ****
// Subject: An error!
// Message-ID: <9311160259.AA03353@pi14.arc.umn.edu>
! #include <stdlib.h>
! #include <stdio.h>
! #include <assert.h>
! #include <fstream.h>
! #include <iostream.h>
! #include <math.h>
#define ANSI_C
--- 5,16 ----
// Subject: An error!
// Message-ID: <9311160259.AA03353@pi14.arc.umn.edu>
! #include <cstdlib>
! #include <cstdio>
! #include <cassert>
! #include <fstream>
! #include <iostream>
! #include <cmath>
#define ANSI_C
*************** class Vector
*** 79,85 ****
double assign( int, double );
! friend ostream& operator<<( ostream&, const Vector& m );
private:
--- 79,85 ----
double assign( int, double );
! friend std::ostream& operator<<(std::ostream&, const Vector& m );
private:
*************** assign( int rownum, double d )
*** 162,171 ****
assert(r);
if( rownum > row() || rownum <= 0 ) {
! cerr << "Warning: trying to assign out of bounds" << endl;
! cerr << "row " << rownum << endl;
! cerr << "Vector size " << row() << endl;
! abort();
}
if( r->count == 1 ) {
--- 162,171 ----
assert(r);
if( rownum > row() || rownum <= 0 ) {
! std::cerr << "Warning: trying to assign out of bounds" << std::endl;
! std::cerr << "row " << rownum << std::endl;
! std::cerr << "Vector size " << row() << std::endl;
! std::abort();
}
if( r->count == 1 ) {
*************** VecElem( Vector &vec, int r )
*** 232,239 ****
: v(vec), row(r)
{
if( r < 1 || r > vec.row() ) {
! cerr << "Trying to access vector element out of bounds" << endl;
! abort();
}
}
--- 232,240 ----
: v(vec), row(r)
{
if( r < 1 || r > vec.row() ) {
! std::cerr << "Trying to access vector element out of bounds";
! std::cerr << std::endl;
! std::abort();
}
}
*************** int main()
*** 268,276 ****
int i, j;
if (makeforms (cen,a,b) != 10)
! { printf ("FAIL\n"); return 1; }
else
! printf ("PASS\n");
}
--- 269,277 ----
int i, j;
if (makeforms (cen,a,b) != 10)
! { std::printf ("FAIL\n"); return 1; }
else
! std::printf ("PASS\n");
}
*************** makeforms( Vector cen, Vector **a, Vecto
*** 280,283 ****
--- 281,286 ----
{
return 10;
}
+
+
Index: testsuite/g++.old-deja/g++.law/ctors10.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/ctors10.C,v
retrieving revision 1.3
diff -c -p -r1.3 ctors10.C
*** ctors10.C 2000/10/26 23:17:34 1.3
--- ctors10.C 2001/04/06 21:51:48
***************
*** 6,19 ****
// Subject: bug019.cc
// Date: Fri, 5 Feb 93 15:51:42 -0800
! #include <iostream.h>
class Class
{
! class Err : public ostream
{
public:
! Err(void) : ostream(NULL) { }
~Err(void) { }
};
public:
--- 6,19 ----
// Subject: bug019.cc
// Date: Fri, 5 Feb 93 15:51:42 -0800
! #include <iostream>
class Class
{
! class Err : public std::ostream
{
public:
! Err(void) : std::ostream(NULL) { }
~Err(void) { }
};
public:
*************** public:
*** 22,24 ****
--- 22,28 ----
private:
char x;
};
+
+
+
+
Index: testsuite/g++.old-deja/g++.law/ctors12.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/ctors12.C,v
retrieving revision 1.4
diff -c -p -r1.4 ctors12.C
*** ctors12.C 2000/08/22 18:16:12 1.4
--- ctors12.C 2001/04/06 21:51:48
***************
*** 1,7 ****
// GROUPS passed constructors
! #include <stdio.h>
! #include <stdlib.h>
! #include <iostream.h>
#define MAGIC 7654
--- 1,7 ----
// GROUPS passed constructors
! #include <cstdio>
! #include <cstdlib>
! #include <iostream>
#define MAGIC 7654
*************** public:
*** 14,22 ****
complex() { re=im=0; magic=MAGIC; }
complex(double d) { re=d; im=0; magic=MAGIC; }
complex(double d, double d2) {re=d; im=d2; magic=MAGIC; }
! ~complex() {if(magic!=MAGIC) {printf("FAIL\n");exit(1);}}
! friend ostream& operator << (ostream& o, const complex& c)
! { return o << "(" << c.re << "," << c.im << ")"; }
};
int complex::count=0;
--- 14,22 ----
complex() { re=im=0; magic=MAGIC; }
complex(double d) { re=d; im=0; magic=MAGIC; }
complex(double d, double d2) {re=d; im=d2; magic=MAGIC; }
! ~complex() {if(magic!=MAGIC) {std::printf("FAIL\n"); std::exit(1);}}
! friend std::ostream& operator << (std::ostream& o, const complex& c)
! { return o << "(" << c.re << "," << c.im << ")"; }
};
int complex::count=0;
*************** int main()
*** 27,33 ****
int i; // page 289
for(i=0; i<6; i++) ;
! printf ("PASS\n");
return 0;
}
--- 27,33 ----
int i; // page 289
for(i=0; i<6; i++) ;
! std::printf ("PASS\n");
return 0;
}
Index: testsuite/g++.old-deja/g++.law/ctors13.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/ctors13.C,v
retrieving revision 1.4
diff -c -p -r1.4 ctors13.C
*** ctors13.C 1998/12/16 21:39:37 1.4
--- ctors13.C 2001/04/06 21:51:48
***************
*** 1,6 ****
// Build don't link:
// GROUPS passed constructors
! #include <iostream.h>
class A {
A() {} // private constructor// ERROR - .*
--- 1,6 ----
// Build don't link:
// GROUPS passed constructors
! #include <iostream>
class A {
A() {} // private constructor// ERROR - .*
*************** class A {
*** 9,16 ****
int main() {
A* a = new A();// ERROR - .*
if (a) {
! cout << "a != NULL\n";
} else {
! cout << "a == NULL\n";
}
}
--- 9,18 ----
int main() {
A* a = new A();// ERROR - .*
if (a) {
! std::cout << "a != NULL\n";
} else {
! std::cout << "a == NULL\n";
}
}
+
+
Index: testsuite/g++.old-deja/g++.law/ctors17.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/ctors17.C,v
retrieving revision 1.4
diff -c -p -r1.4 ctors17.C
*** ctors17.C 2001/01/08 11:45:21 1.4
--- ctors17.C 2001/04/06 21:51:48
***************
*** 7,15 ****
// Date: Tue, 15 Jun 1993 18:34:14 +0200 (MET DST)
! #include <fstream.h>
! class X : public ifstream { // ERROR - candidate
public:
X(int a, char *b) {} // ERROR - candidate
};
--- 7,15 ----
// Date: Tue, 15 Jun 1993 18:34:14 +0200 (MET DST)
! #include <fstream>
! class X : public std::ifstream { // ERROR - candidate
public:
X(int a, char *b) {} // ERROR - candidate
};
Index: testsuite/g++.old-deja/g++.law/ctors6.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/ctors6.C,v
retrieving revision 1.2
diff -c -p -r1.2 ctors6.C
*** ctors6.C 1998/12/16 21:39:51 1.2
--- ctors6.C 2001/04/06 21:51:48
***************
*** 1,8 ****
// Build don't link:
// GROUPS passed constructors
! #include <complex.h>
! double foo(double_complex *a)
{
return 0.0;
}
--- 1,8 ----
// Build don't link:
// GROUPS passed constructors
! #include <complex>
! double foo(std::complex<double> *a)
{
return 0.0;
}
*************** double foo(double_complex *a)
*** 10,15 ****
double bar(void)
{
! double_complex v[10];
return foo(v);
}
--- 10,15 ----
double bar(void)
{
! std::complex<double> v[10];
return foo(v);
}
Index: testsuite/g++.old-deja/g++.law/cvt16.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/cvt16.C,v
retrieving revision 1.2
diff -c -p -r1.2 cvt16.C
*** cvt16.C 1998/12/16 21:40:03 1.2
--- cvt16.C 2001/04/06 21:51:48
***************
*** 6,12 ****
// Subject: g++ bug
// Date: Mon, 12 Apr 93 10:47:01 MDT
! #include <iostream.h>
class B {
};
--- 6,12 ----
// Subject: g++ bug
// Date: Mon, 12 Apr 93 10:47:01 MDT
! #include <iostream>
class B {
};
*************** public:
*** 22,29 ****
main() {
A a(37);
//cout << a << endl;
! cout << (short)a << endl;
return 0;
} // main
--- 22,30 ----
main() {
A a(37);
//cout << a << endl;
! std::cout << (short)a << std::endl;
return 0;
} // main
+
Index: testsuite/g++.old-deja/g++.law/cvt2.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/cvt2.C,v
retrieving revision 1.5
diff -c -p -r1.5 cvt2.C
*** cvt2.C 2000/08/22 18:16:12 1.5
--- cvt2.C 2001/04/06 21:51:49
***************
*** 1,9 ****
// GROUPS passed conversions
! #include <stdio.h>
! #include <stdlib.h>
! #include <string.h>
! #include <iostream.h>
! #include <fstream.h>
class cvec {
public:
--- 1,9 ----
// GROUPS passed conversions
! #include <cstdio>
! #include <cstdlib>
! #include <cstring>
! #include <iostream>
! #include <fstream>
class cvec {
public:
*************** void
*** 25,42 ****
A(const char* s)
{
// s still ok here
! ifstream inf(s);
! if (strncmp ("aaa", s, 3))
{
! printf ("FAIL\n");
! exit (1);
}
else
! printf ("PASS\n");
}
int main()
{
A(B("aaa"));
}
--- 25,47 ----
A(const char* s)
{
// s still ok here
! std::ifstream inf(s);
! if (std::strncmp ("aaa", s, 3))
{
! std::printf ("FAIL\n");
! std::exit (1);
}
else
! std::printf ("PASS\n");
}
int main()
{
A(B("aaa"));
}
+
+
+
+
+
Index: testsuite/g++.old-deja/g++.law/cvt7.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/cvt7.C,v
retrieving revision 1.5
diff -c -p -r1.5 cvt7.C
*** cvt7.C 2000/12/09 18:34:11 1.5
--- cvt7.C 2001/04/06 21:51:49
***************
*** 5,12 ****
// Message-Id: <9208250205.AA26351@icsib43.ICSI.Berkeley.EDU>
// Subject: implicit int. convs. from member refs. in switch expressions
! #include <stream.h>
! #include <stdio.h>
class A
{
--- 5,11 ----
// Message-Id: <9208250205.AA26351@icsib43.ICSI.Berkeley.EDU>
// Subject: implicit int. convs. from member refs. in switch expressions
! #include <cstdio>
class A
{
*************** int main()
*** 58,67 ****
switch (ar2)
{
case 1:
! printf ("PASS\n");
break;
default:
! { printf ("FAIL\n"); return 1; }
}
B b(a);
--- 57,66 ----
switch (ar2)
{
case 1:
! std::printf ("PASS\n");
break;
default:
! { std::printf ("FAIL\n"); return 1; }
}
B b(a);
*************** int main()
*** 72,74 ****
--- 71,80 ----
return 0;
}
+
+
+
+
+
+
+
Index: testsuite/g++.old-deja/g++.law/except5.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/except5.C,v
retrieving revision 1.2
diff -c -p -r1.2 except5.C
*** except5.C 1998/12/16 21:40:40 1.2
--- except5.C 2001/04/06 21:51:49
***************
*** 7,13 ****
// Subject: exception's bug?
// Date: Wed, 10 Nov 1993 11:07:12 -0500
! #include <stream.h>
class X {
int *a;
int sz;
--- 7,14 ----
// Subject: exception's bug?
// Date: Wed, 10 Nov 1993 11:07:12 -0500
! #include <iostream>
!
class X {
int *a;
int sz;
*************** main()
*** 33,39 ****
for (int i = 0; i < 12; i++)
c[i] = 1;
} catch (X::range) {
! cerr << "invalid range\n";
}
return 0;
}
--- 34,40 ----
for (int i = 0; i < 12; i++)
c[i] = 1;
} catch (X::range) {
! std::cerr << "invalid range\n";
}
return 0;
}
Index: testsuite/g++.old-deja/g++.law/missed-error2.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C,v
retrieving revision 1.4
diff -c -p -r1.4 missed-error2.C
*** missed-error2.C 1998/12/16 21:41:10 1.4
--- missed-error2.C 2001/04/06 21:51:49
***************
*** 6,12 ****
// Subject: More on [g++ 2.1 : overloaded function selection incorrect]
// Message-ID: <9205212240.AA17934@ndc.com>
! #include <iostream.h>
inline int max(int a, int b) {return a > b ? a : b;}; // ERROR - candidate
inline double max(double a, double b) {return a > b ? a : b;}; // ERROR - candidate
--- 6,12 ----
// Subject: More on [g++ 2.1 : overloaded function selection incorrect]
// Message-ID: <9205212240.AA17934@ndc.com>
! #include <iostream>
inline int max(int a, int b) {return a > b ? a : b;}; // ERROR - candidate
inline double max(double a, double b) {return a > b ? a : b;}; // ERROR - candidate
*************** int main() {
*** 21,28 ****
// about the declaration above
static void foo(int i, int j, double x, double y) {
! cout << "Max(int): " << max(i,j) << " Max(double): " <<
max(x,y) << '\n';
! cout << "Max(int, double): " << max(i, y) << '\n';// ERROR -
}
--- 21,28 ----
// about the declaration above
static void foo(int i, int j, double x, double y) {
! std::cout << "Max(int): " << max(i,j) << " Max(double): " <<
max(x,y) << '\n';
! std::cout << "Max(int, double): " << max(i, y) << '\n';// ERROR -
}
Index: testsuite/g++.old-deja/g++.law/nest3.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/nest3.C,v
retrieving revision 1.3
diff -c -p -r1.3 nest3.C
*** nest3.C 1998/12/16 21:41:15 1.3
--- nest3.C 2001/04/06 21:51:49
***************
*** 1,15 ****
// Build don't link:
// GROUPS passed nest
! #include <iostream.h>
struct inner {
! static void f() { cout << "inner::f()\n";}
};
struct outer {
struct inner {
! static void f() { cout << "outer::inner::f()\n";}
};
static void f() {
--- 1,15 ----
// Build don't link:
// GROUPS passed nest
! #include <iostream>
struct inner {
! static void f() { std::cout << "inner::f()\n";}
};
struct outer {
struct inner {
! static void f() { std::cout << "outer::inner::f()\n";}
};
static void f() {
*************** struct outer {
*** 20,25 ****
int main() {
outer::f();
! cout << endl;
return 0;
}
--- 20,25 ----
int main() {
outer::f();
! std::cout << std::endl;
return 0;
}
Index: testsuite/g++.old-deja/g++.law/operators32.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/operators32.C,v
retrieving revision 1.3
diff -c -p -r1.3 operators32.C
*** operators32.C 1998/12/16 21:41:42 1.3
--- operators32.C 2001/04/06 21:51:49
***************
*** 1,6 ****
// Build don't link:
// GROUPS passed operators
! #include <iostream.h>
//
// frees space allocated for N-D array
--- 1,6 ----
// Build don't link:
// GROUPS passed operators
! #include <iostream>
//
// frees space allocated for N-D array
*************** long d1 = 3, d2 = 4;
*** 43,51 ****
class foo
{
public:
! foo() {cout << "foo created" << endl; }
! ~foo() {cout << "foo deleted" << endl; }
};
foo **f2;
--- 43,51 ----
class foo
{
public:
! foo() {std::cout << "foo created" << std::endl; }
! ~foo() {std::cout << "foo deleted" << std::endl; }
};
foo **f2;
Index: testsuite/g++.old-deja/g++.law/vbase1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/vbase1.C,v
retrieving revision 1.3
diff -c -p -r1.3 vbase1.C
*** vbase1.C 1998/12/16 21:42:41 1.3
--- vbase1.C 2001/04/06 21:51:49
***************
*** 7,17 ****
// Message-ID: <317f1j$o9c@agate.berkeley.edu>
! #include <iostream.h>
class a {
protected:
! virtual void foo() { cout << "Class A\n";}
};
class b : public virtual a {};
--- 7,17 ----
// Message-ID: <317f1j$o9c@agate.berkeley.edu>
! #include <iostream>
class a {
protected:
! virtual void foo() { std::cout << "Class A\n";}
};
class b : public virtual a {};
*************** int main() {
*** 25,28 ****
--- 25,29 ----
c test;
test.bar();
}
+
Index: testsuite/g++.old-deja/g++.law/virtual3.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/virtual3.C,v
retrieving revision 1.5
diff -c -p -r1.5 virtual3.C
*** virtual3.C 2000/11/22 19:05:40 1.5
--- virtual3.C 2001/04/06 21:51:49
***************
*** 5,16 ****
// Date: 4 Nov 1993 22:57:36 -0500
// Message-ID: <9311041820.AA05942@ramjet.multinet.DE>
! #include <iostream.h>
! #include <strstream.h>
using namespace std;
! class BugStream : public ostrstream {
public:
BugStream() {}
BugStream& eval();
--- 5,16 ----
// Date: 4 Nov 1993 22:57:36 -0500
// Message-ID: <9311041820.AA05942@ramjet.multinet.DE>
! #include <iostream>
! #include <sstream>
using namespace std;
! class BugStream : public ostringstream {
public:
BugStream() {}
BugStream& eval();
*************** BugStream& BugStream::eval()
*** 26,37 ****
*this << ends;
// eval the command and set the status
! char* s = str();
cerr << s << endl;
// reset the stream for the next command
clear(ios::goodbit);
! rdbuf()->freeze(0);
seekp(0);
return *this;
--- 26,37 ----
*this << ends;
// eval the command and set the status
! const char* s = str().data();
cerr << s << endl;
// reset the stream for the next command
clear(ios::goodbit);
! // rdbuf()->freeze(0);
seekp(0);
return *this;
Index: testsuite/g++.old-deja/g++.law/visibility1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/visibility1.C,v
retrieving revision 1.3
diff -c -p -r1.3 visibility1.C
*** visibility1.C 1998/12/16 21:42:47 1.3
--- visibility1.C 2001/04/06 21:51:49
***************
*** 1,6 ****
// Build don't link:
// GROUPS passed visibility
! #include <iostream.h>
--- 1,6 ----
// Build don't link:
// GROUPS passed visibility
! #include <iostream>
*************** class base {
*** 8,24 ****
//==========
void base_priv(char * n)
! { cout << "base_priv called from: " << n << "\n"; };
protected:
void base_prot(char * n)
! { cout << "base_prot called from: " << n << "\n"; };
public:
void base_publ(char * n)
! { cout << "base_publ called from: " << n << "\n"; };
void test(char * n) { base_publ(n); base_prot(n); base_priv(n); }
--- 8,24 ----
//==========
void base_priv(char * n)
! { std::cout << "base_priv called from: " << n << "\n"; };
protected:
void base_prot(char * n)
! { std::cout << "base_prot called from: " << n << "\n"; };
public:
void base_publ(char * n)
! { std::cout << "base_publ called from: " << n << "\n"; };
void test(char * n) { base_publ(n); base_prot(n); base_priv(n); }
*************** int main(int argc, char *argv[])
*** 57,68 ****
base b;
b.base_publ("base class object");
b.test("member of base class object");
! cout << "\n";
derived pd;
pd.test("member of derived class object");
derived_friend();
! cout << "\n";
} /* main */
--- 57,68 ----
base b;
b.base_publ("base class object");
b.test("member of base class object");
! std::cout << "\n";
derived pd;
pd.test("member of derived class object");
derived_friend();
! std::cout << "\n";
} /* main */
Index: testsuite/g++.old-deja/g++.law/visibility10.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/visibility10.C,v
retrieving revision 1.2
diff -c -p -r1.2 visibility10.C
*** visibility10.C 1998/12/16 21:42:48 1.2
--- visibility10.C 2001/04/06 21:51:49
***************
*** 1,12 ****
// Build don't link:
// GROUPS passed visibility
! #include <iostream.h>
class base {
public:
! void f1 () { cout << "f1" << endl; };
! void f2 () { cout << "f2" << endl; };
};
class deriv : public base {
--- 1,12 ----
// Build don't link:
// GROUPS passed visibility
! #include <iostream>
class base {
public:
! void f1 () { std::cout << "f1" << std::endl; };
! void f2 () { std::cout << "f2" << std::endl; };
};
class deriv : public base {
*************** int main ()
*** 19,21 ****
--- 19,22 ----
d.f2();
}
+
Index: testsuite/g++.old-deja/g++.law/visibility13.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/visibility13.C,v
retrieving revision 1.6
diff -c -p -r1.6 visibility13.C
*** visibility13.C 1999/03/09 23:01:53 1.6
--- visibility13.C 2001/04/06 21:51:50
***************
*** 6,15 ****
// Subject: class, template and their scoping problem
// Message-ID: <9307130521.AA18312@oahu.cs.ucla.edu>
! #include <iostream.h>
! #include <assert.h>
// --------------- Array.h && Array.cc ------------------
const int ArraySize = 12;
--- 6,17 ----
// Subject: class, template and their scoping problem
// Message-ID: <9307130521.AA18312@oahu.cs.ucla.edu>
! #include <iostream>
! #include <cassert>
// --------------- Array.h && Array.cc ------------------
+
+ using namespace std;
const int ArraySize = 12;
Index: testsuite/g++.old-deja/g++.law/visibility17.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/visibility17.C,v
retrieving revision 1.4
diff -c -p -r1.4 visibility17.C
*** visibility17.C 2000/05/28 05:38:01 1.4
--- visibility17.C 2001/04/06 21:51:50
***************
*** 5,12 ****
// Date: Thu, 05 Aug 1993 17:23:20 -0700
// Subject: Access to private constructor.
// Message-ID: <9308060023.AA10283@neptune.caere.com>
! #include <iostream.h>
! #include <string.h>
class Base
{
--- 5,12 ----
// Date: Thu, 05 Aug 1993 17:23:20 -0700
// Subject: Access to private constructor.
// Message-ID: <9308060023.AA10283@neptune.caere.com>
! #include <iostream>
! #include <cstring>
class Base
{
*************** private:
*** 33,45 ****
Base::Base()
{ // ERROR - private
! name_ = strcpy(new char[strlen(" ") + 1], " ");
}
Base::Base(char* str)
{ // ERROR - private
if(str != NULL)
! name_ = strcpy(new char[strlen(str) + 1], str);
}
Derived::Derived(int n, char* str) : Base(str)
--- 33,45 ----
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)
*************** int main()
*** 59,64 ****
// Derived* d = new Derived(10, "test");
Derived* d = new Derived(10);
! cerr << d->getNum() << "\t" << d->getName() << endl;
}
--- 59,66 ----
// Derived* d = new Derived(10, "test");
Derived* d = new Derived(10);
! std::cerr << d->getNum() << "\t" << d->getName() << std::endl;
}
+
+
Index: testsuite/g++.old-deja/g++.law/visibility2.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/visibility2.C,v
retrieving revision 1.3
diff -c -p -r1.3 visibility2.C
*** visibility2.C 1998/12/16 21:42:58 1.3
--- visibility2.C 2001/04/06 21:51:50
***************
*** 1,6 ****
// Build don't link:
// GROUPS passed visibility
! #include <iostream.h>
--- 1,6 ----
// Build don't link:
// GROUPS passed visibility
! #include <iostream>
*************** class base {
*** 8,24 ****
//==========
void base_priv(char * n)
! { cout << "base_priv called from: " << n << "\n"; };
protected:
void base_prot(char * n)
! { cout << "base_prot called from: " << n << "\n"; };
public:
void base_publ(char * n)
! { cout << "base_publ called from: " << n << "\n"; };
void test(char * n) { base_publ(n); base_prot(n); base_priv(n); }
--- 8,24 ----
//==========
void base_priv(char * n)
! { std::cout << "base_priv called from: " << n << "\n"; };
protected:
void base_prot(char * n)
! { std::cout << "base_prot called from: " << n << "\n"; };
public:
void base_publ(char * n)
! { std::cout << "base_publ called from: " << n << "\n"; };
void test(char * n) { base_publ(n); base_prot(n); base_priv(n); }
*************** int main(int argc, char *argv[])
*** 57,68 ****
base b;
b.base_publ("base class object");
b.test("member of base class object");
! cout << "\n";
derived pd;
pd.test("member of derived class object");
derived_friend();
! cout << "\n";
} /* main */
--- 57,68 ----
base b;
b.base_publ("base class object");
b.test("member of base class object");
! std::cout << "\n";
derived pd;
pd.test("member of derived class object");
derived_friend();
! std::cout << "\n";
} /* main */
Index: testsuite/g++.old-deja/g++.law/visibility22.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/visibility22.C,v
retrieving revision 1.3
diff -c -p -r1.3 visibility22.C
*** visibility22.C 1998/12/16 21:43:01 1.3
--- visibility22.C 2001/04/06 21:51:50
***************
*** 7,13 ****
// Message-ID: <9308121348.aa26256@Paris.ics.uci.edu>
// 5.cc
! #include <stream.h>
class A {
int x;
--- 7,13 ----
// Message-ID: <9308121348.aa26256@Paris.ics.uci.edu>
// 5.cc
! #include <iostream>
class A {
int x;
*************** protected:
*** 23,25 ****
--- 23,30 ----
public:
A::g;
};
+
+
+
+
+
Index: testsuite/g++.old-deja/g++.law/visibility25.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/visibility25.C,v
retrieving revision 1.3
diff -c -p -r1.3 visibility25.C
*** visibility25.C 2000/02/13 19:07:43 1.3
--- visibility25.C 2001/04/06 21:51:50
***************
*** 5,11 ****
// Date: Wed, 17 Nov 93 21:30:32 EST
// Subject: gcc 2.5.3 - can't privately inherit and contain same class
// Message-ID: <9311171030.AA00604@mencon>
! #include <iostream.h>
class A {
public:
--- 5,11 ----
// Date: Wed, 17 Nov 93 21:30:32 EST
// Subject: gcc 2.5.3 - can't privately inherit and contain same class
// Message-ID: <9311171030.AA00604@mencon>
! #include <iostream>
class A {
public:
*************** public:
*** 24,26 ****
--- 24,33 ----
private:
::A a;
};
+
+
+
+
+
+
+
Index: testsuite/g++.old-deja/g++.law/visibility7.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/visibility7.C,v
retrieving revision 1.3
diff -c -p -r1.3 visibility7.C
*** visibility7.C 1998/12/16 21:43:12 1.3
--- visibility7.C 2001/04/06 21:51:50
***************
*** 5,11 ****
// Date: Wed, 21 Apr 93 09:42:07 +0100
// Subject: /*** BUG REPORT : THE MYTH OF PRIVATE INHERITANCE ***/
// Message-ID: <9304210842.AA01815@life.ai.mit.edu>
! #include <iostream.h>
class A {
private:
--- 5,11 ----
// Date: Wed, 21 Apr 93 09:42:07 +0100
// Subject: /*** BUG REPORT : THE MYTH OF PRIVATE INHERITANCE ***/
// Message-ID: <9304210842.AA01815@life.ai.mit.edu>
! #include <iostream>
class A {
private:
*************** int main()
*** 64,71 ****
B* bobject = new B(2, 1);
C* cobject = new C(bobject);
cobject->setBValue(8);
! cout << cobject->getBValue() << endl;
delete bobject;
delete cobject;
}
--- 64,73 ----
B* bobject = new B(2, 1);
C* cobject = new C(bobject);
cobject->setBValue(8);
! std::cout << cobject->getBValue() << std::endl;
delete bobject;
delete cobject;
}
+
+
Index: testsuite/g++.old-deja/g++.law/weak.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.law/weak.C,v
retrieving revision 1.3
diff -c -p -r1.3 weak.C
*** weak.C 2000/11/04 20:13:43 1.3
--- weak.C 2001/04/06 21:51:50
***************
*** 5,20 ****
// libc-5.4.xx has __IO_putc in its static C library, which can conflict
// with the copy of __IO_putc in the libstdc++ library built by egcs.
! #include <iostream.h>
! #include <streambuf.h>
! #include <stdio.h>
! istream x (0);
main () {
x.get();
! putc(0, 0);
! fgets(0, 0, 0);
x.get((char*) 0, 0);
}
--- 5,20 ----
// libc-5.4.xx has __IO_putc in its static C library, which can conflict
// with the copy of __IO_putc in the libstdc++ library built by egcs.
! #include <iostream>
! #include <streambuf>
! #include <cstdio>
! std::istream x (0);
main () {
x.get();
! std::putc(0, 0);
! std::fgets(0, 0, 0);
x.get((char*) 0, 0);
}
Index: testsuite/g++.old-deja/g++.mike/eh2.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.mike/eh2.C,v
retrieving revision 1.3
diff -c -p -r1.3 eh2.C
*** eh2.C 2001/02/02 18:27:22 1.3
--- eh2.C 2001/04/06 21:51:50
***************
*** 1,8 ****
// Special g++ Options: -fexceptions
// excess errors test - XFAIL a29k-*-* sparc64-*-elf arm-*-pe
! #include <stdlib.h>
! #include <iostream.h>
class Vector {
private:
--- 1,8 ----
// Special g++ Options: -fexceptions
// excess errors test - XFAIL a29k-*-* sparc64-*-elf arm-*-pe
! #include <cstdlib>
! #include <iostream>
class Vector {
private:
*************** f(Vector& v) {
*** 57,65 ****
try {
do_something( v );
} catch (Vector::Range& r) {
! cout << "Invalid vector range " << r.value()
! << " caught in f()" << endl;
! exit(0);
}
}
--- 57,65 ----
try {
do_something( v );
} catch (Vector::Range& r) {
! std::cout << "Invalid vector range " << r.value()
! << " caught in f()" << std::endl;
! std::exit(0);
}
}
*************** main() {
*** 69,71 ****
--- 69,74 ----
f( v );
return 1;
}
+
+
+
Index: testsuite/g++.old-deja/g++.mike/memoize1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.mike/memoize1.C,v
retrieving revision 1.2
diff -c -p -r1.2 memoize1.C
*** memoize1.C 1998/12/16 21:45:02 1.2
--- memoize1.C 2001/04/06 21:51:51
***************
*** 1,4 ****
// Build don't link:
// Special g++ Options: -fsave-memoized
! #include <iostream.h>
--- 1,4 ----
// Build don't link:
// Special g++ Options: -fsave-memoized
! #include <iostream>
Index: testsuite/g++.old-deja/g++.mike/net34.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.mike/net34.C,v
retrieving revision 1.5
diff -c -p -r1.5 net34.C
*** net34.C 2000/03/01 08:48:08 1.5
--- net34.C 2001/04/06 21:51:51
***************
*** 1,6 ****
// Special g++ Options:
! #include <iostream.h>
class foo {
public:
--- 1,6 ----
// Special g++ Options:
! #include <iostream>
class foo {
public:
*************** class multiple : public bar_1, public ba
*** 25,34 ****
public:
multiple(int i1, int i2) : bar_1(i1), bar_2(i2) {}
void print() {
! cout << "bar_1::k -> " << bar_1::k << "\n";
! cout << "bar_2::k -> " << bar_2::k << "\n";
! cout << "bar_1::get_k() -> " << bar_1::get_k() << "\n";
! cout << "bar_2::get_k() -> " << bar_2::get_k() << "\n";
}
};
--- 25,34 ----
public:
multiple(int i1, int i2) : bar_1(i1), bar_2(i2) {}
void print() {
! std::cout << "bar_1::k -> " << bar_1::k << "\n";
! std::cout << "bar_2::k -> " << bar_2::k << "\n";
! std::cout << "bar_1::get_k() -> " << bar_1::get_k() << "\n";
! std::cout << "bar_2::get_k() -> " << bar_2::get_k() << "\n";
}
};
*************** int main() {
*** 36,38 ****
--- 36,40 ----
multiple m(1,2);
m.print();
}
+
+
Index: testsuite/g++.old-deja/g++.mike/net46.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.mike/net46.C,v
retrieving revision 1.6
diff -c -p -r1.6 net46.C
*** net46.C 2000/06/12 23:48:11 1.6
--- net46.C 2001/04/06 21:51:51
***************
*** 1,6 ****
! #include <iostream.h>
! #include <stdlib.h>
! #include <stddef.h>
#include <new>
int fail = 1;
--- 1,6 ----
! #include <iostream>
! #include <cstdlib>
! #include <cstddef>
#include <new>
int fail = 1;
*************** void *operator new(size_t size) throw (s
*** 14,20 ****
}
int main() {
! cout << "";
in_main = 1;
new int;
return fail;
--- 14,20 ----
}
int main() {
! std::cout << "";
in_main = 1;
new int;
return fail;
Index: testsuite/g++.old-deja/g++.mike/p658.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.mike/p658.C,v
retrieving revision 1.5
diff -c -p -r1.5 p658.C
*** p658.C 2000/10/26 23:17:34 1.5
--- p658.C 2001/04/06 21:51:51
***************
*** 1,7 ****
// prms-id: 658
! #include <ostream.h>
! #include <stdlib.h>
/* We may not find the libg++ <bool.h>. */
#ifndef FALSE
--- 1,7 ----
// prms-id: 658
! #include <iostream>
! #include <cstdlib>
/* We may not find the libg++ <bool.h>. */
#ifndef FALSE
*************** void
*** 65,72 ****
Object::OK() const
{
if (_destructed) {
! cerr << "FAILURE - reference was made to a destructed object\n";
! abort();
}
}
--- 65,72 ----
Object::OK() const
{
if (_destructed) {
! std::cerr << "FAILURE - reference was made to a destructed object\n";
! std::abort();
}
}
*************** Char::operator char () const
*** 98,100 ****
--- 98,102 ----
{
return _c;
}
+
+
Index: testsuite/g++.old-deja/g++.mike/rtti1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.mike/rtti1.C,v
retrieving revision 1.2
diff -c -p -r1.2 rtti1.C
*** rtti1.C 1998/12/16 21:49:13 1.2
--- rtti1.C 2001/04/06 21:51:52
***************
*** 1,4 ****
// Build don't link:
#include <typeinfo>
! #include <iostream.h>
--- 1,4 ----
// Build don't link:
#include <typeinfo>
! #include <iostream>
Index: testsuite/g++.old-deja/g++.other/sibcall1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.other/sibcall1.C,v
retrieving revision 1.2
diff -c -p -r1.2 sibcall1.C
*** sibcall1.C 2000/10/26 23:17:34 1.2
--- sibcall1.C 2001/04/06 21:51:53
***************
*** 1,13 ****
// Special g++ Options: -O2
! #include <iostream.h>
! ostream& foo (char *x, ostream &y)
{
return y << "" << x;
}
int main ()
{
! foo ("", cout);
}
--- 1,13 ----
// Special g++ Options: -O2
! #include <iostream>
! std::ostream& foo (char *x, std::ostream &y)
{
return y << "" << x;
}
int main ()
{
! foo ("", std::cout);
}
Index: testsuite/g++.old-deja/g++.robertl/eb109.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C,v
retrieving revision 1.8
diff -c -p -r1.8 eb109.C
*** eb109.C 2000/12/20 22:01:05 1.8
--- eb109.C 2001/04/06 21:51:56
***************
*** 1,7 ****
#include<map>
! #include<iostream.h>
#include<vector>
#include<string>
// empty parameter class with a minimal set of operations
// if there are no weights for edges necessary
--- 1,9 ----
#include<map>
! #include<iostream>
#include<vector>
#include<string>
+
+ using namespace std;
// empty parameter class with a minimal set of operations
// if there are no weights for edges necessary
Index: testsuite/g++.old-deja/g++.robertl/eb113.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb113.C,v
retrieving revision 1.2
diff -c -p -r1.2 eb113.C
*** eb113.C 1998/12/16 22:03:03 1.2
--- eb113.C 2001/04/06 21:51:56
***************
*** 1,5 ****
// Build don't link:
! #include <iostream.h>
class X : public std::streambuf
{
--- 1,5 ----
// Build don't link:
! #include <iostream>
class X : public std::streambuf
{
Index: testsuite/g++.old-deja/g++.robertl/eb115.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb115.C,v
retrieving revision 1.2
diff -c -p -r1.2 eb115.C
*** eb115.C 1998/12/16 22:03:06 1.2
--- eb115.C 2001/04/06 21:51:56
***************
*** 1,9 ****
// Special g++ Options: -O
! #include <iostream.h>
#include <typeinfo>
int main() {
int *i1, *i2;
! cerr << (typeid(i1)==typeid(i2)) << endl;
}
--- 1,9 ----
// Special g++ Options: -O
! #include <iostream>
#include <typeinfo>
int main() {
int *i1, *i2;
! std::cerr << (typeid(i1)==typeid(i2)) << std::endl;
}
Index: testsuite/g++.old-deja/g++.robertl/eb118.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb118.C,v
retrieving revision 1.4
diff -c -p -r1.4 eb118.C
*** eb118.C 1998/12/16 22:03:08 1.4
--- eb118.C 2001/04/06 21:51:56
***************
*** 1,7 ****
// Test for obsolete specialization syntax. Turn off -pedantic.
// Special g++ Options:
! #include <iostream.h>
#include <typeinfo>
template <typename T>
--- 1,7 ----
// Test for obsolete specialization syntax. Turn off -pedantic.
// Special g++ Options:
! #include <iostream>
#include <typeinfo>
template <typename T>
*************** public:
*** 13,19 ****
template <typename T>
void
A<T>::test(){
! cerr << "test for " << typeid(*this).name() << endl;
}
// Specialization declaration
void
--- 13,19 ----
template <typename T>
void
A<T>::test(){
! std::cerr << "test for " << typeid(*this).name() << std::endl;
}
// Specialization declaration
void
*************** A<double>::test();
*** 22,28 ****
// Specialization definition
void
A<double>::test(){
! cerr << "specialization for " << typeid(*this).name() << endl;
}
--- 22,28 ----
// Specialization definition
void
A<double>::test(){
! std::cerr << "specialization for " << typeid(*this).name() << std::endl;
}
*************** main(){
*** 34,37 ****
--- 34,38 ----
ad.test();
return 0;
}
+
Index: testsuite/g++.old-deja/g++.robertl/eb15.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb15.C,v
retrieving revision 1.3
diff -c -p -r1.3 eb15.C
*** eb15.C 1998/12/16 22:03:29 1.3
--- eb15.C 2001/04/06 21:51:56
***************
*** 1,18 ****
// Build don't link:
! #include<iostream.h>
! #include<stddef.h>
struct A {
A() {
! cerr<<"A constructing\n";
throw 1;
}
void *operator new(size_t sz) {
! cerr<<"A allocated\n";
return ::operator new(sz);
}
void operator delete (void *p) {
! cerr<<"A deleted\n";
::operator delete (p);
}
};
--- 1,18 ----
// Build don't link:
! #include<iostream>
! #include<cstddef>
struct A {
A() {
! std::cerr<<"A constructing\n";
throw 1;
}
void *operator new(size_t sz) {
! std::cerr<<"A allocated\n";
return ::operator new(sz);
}
void operator delete (void *p) {
! std::cerr<<"A deleted\n";
::operator delete (p);
}
};
*************** int main() {
*** 23,25 ****
--- 23,28 ----
} catch (...) {
}
}
+
+
+
Index: testsuite/g++.old-deja/g++.robertl/eb21.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb21.C,v
retrieving revision 1.4
diff -c -p -r1.4 eb21.C
*** eb21.C 2000/11/22 19:05:42 1.4
--- eb21.C 2001/04/06 21:51:56
***************
*** 1,6 ****
#include <vector>
! #include <strstream.h>
using namespace std;
--- 1,6 ----
#include <vector>
! #include <sstream>
using namespace std;
*************** std::vector<connection_t> connections;
*** 16,22 ****
int
main() {
! ostrstream str;
connections.insert(connections.end(), connection_t());
--- 16,22 ----
int
main() {
! ostringstream str;
connections.insert(connections.end(), connection_t());
Index: testsuite/g++.old-deja/g++.robertl/eb24.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb24.C,v
retrieving revision 1.2
diff -c -p -r1.2 eb24.C
*** eb24.C 1998/12/16 22:03:40 1.2
--- eb24.C 2001/04/06 21:51:56
***************
*** 1,5 ****
// Build don't link:
! #include <iostream.h>
template < class T >
class X
--- 1,5 ----
// Build don't link:
! #include <iostream>
template < class T >
class X
*************** class Y : public X<T>
*** 19,23 ****
using X<T>::x;
! void f () { cout << x << endl; }
};
--- 19,23 ----
using X<T>::x;
! void f () { std::cout << x << std::endl; }
};
Index: testsuite/g++.old-deja/g++.robertl/eb3.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb3.C,v
retrieving revision 1.2
diff -c -p -r1.2 eb3.C
*** eb3.C 1998/12/16 22:03:46 1.2
--- eb3.C 2001/04/06 21:51:56
***************
*** 1,5 ****
// Build don't link:
! #include <complex.h>
template<class T>
class Vec {
public:
--- 1,5 ----
// Build don't link:
! #include <complex>
template<class T>
class Vec {
public:
*************** public:
*** 8,11 ****
void operator=(const Vec<T> &v) { data = new T; }
T *data;
};
! template class Vec<complex<double> >;
--- 8,11 ----
void operator=(const Vec<T> &v) { data = new T; }
T *data;
};
! template class Vec<std::complex<double> >;
Index: testsuite/g++.old-deja/g++.robertl/eb30.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb30.C,v
retrieving revision 1.2
diff -c -p -r1.2 eb30.C
*** eb30.C 1998/12/16 22:03:47 1.2
--- eb30.C 2001/04/06 21:51:56
***************
*** 1,7 ****
// Build don't link:
! #include <fstream.h>
! class bifstream : public ifstream {
public:
bifstream();
// ~bifstream();
--- 1,7 ----
// Build don't link:
! #include <fstream>
! class bifstream : public std::ifstream {
public:
bifstream();
// ~bifstream();
*************** void load_bin()
*** 14,16 ****
--- 14,19 ----
if (!InFile)
return;
}
+
+
+
Index: testsuite/g++.old-deja/g++.robertl/eb31.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb31.C,v
retrieving revision 1.2
diff -c -p -r1.2 eb31.C
*** eb31.C 1998/12/16 22:03:48 1.2
--- eb31.C 2001/04/06 21:51:56
***************
*** 1,4 ****
! #include<iostream.h>
int main() {
try {
--- 1,4 ----
! #include<iostream>
int main() {
try {
*************** int main() {
*** 15,17 ****
--- 15,19 ----
}
return 0;
}
+
+
Index: testsuite/g++.old-deja/g++.robertl/eb33.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb33.C,v
retrieving revision 1.2
diff -c -p -r1.2 eb33.C
*** eb33.C 1998/12/16 22:03:50 1.2
--- eb33.C 2001/04/06 21:51:56
***************
*** 1,11 ****
! #include <fstream.h>
! #include <stdio.h>
int
main()
{
! printf("If you see this, you don't have a problem!\n");
#ifdef EXPOSE_BUG
! ifstream a;
#endif
}
--- 1,11 ----
! #include <fstream>
! #include <cstdio>
int
main()
{
! std::printf("If you see this, you don't have a problem!\n");
#ifdef EXPOSE_BUG
! std::ifstream a;
#endif
}
Index: testsuite/g++.old-deja/g++.robertl/eb39.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb39.C,v
retrieving revision 1.5
diff -c -p -r1.5 eb39.C
*** eb39.C 2000/11/22 19:05:42 1.5
--- eb39.C 2001/04/06 21:51:57
***************
*** 1,10 ****
// Build don't link:
! #include <ctype.h>
! #include <iostream.h>
! // #include <streambuf.h>
! // #include <libio.h>
! #include <strstream.h>
! #include <string.h>
using namespace std;
--- 1,8 ----
// Build don't link:
! #include <cctype>
! #include <iostream>
! #include <sstream>
! #include <cstring>
using namespace std;
*************** extern bool foo2 (ostream &out, istream
*** 13,19 ****
bool
foo1 (ostream &out, const char *in)
{
! strstreambuf sb (in, (int) strlen (in));
istream fmt (&sb);
return foo2 (out, fmt);
}
--- 11,18 ----
bool
foo1 (ostream &out, const char *in)
{
! string tmp(in, strlen(in));
! stringbuf sb (tmp);
istream fmt (&sb);
return foo2 (out, fmt);
}
Index: testsuite/g++.old-deja/g++.robertl/eb4.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb4.C,v
retrieving revision 1.4
diff -c -p -r1.4 eb4.C
*** eb4.C 1998/12/16 22:03:58 1.4
--- eb4.C 2001/04/06 21:51:57
***************
*** 1,6 ****
// Error: Internal Compiler Error in GCC 2.7.2 and EGCS 1998/05/28 snapshot.
! #include <iostream.h>
class some_base
{
--- 1,6 ----
// Error: Internal Compiler Error in GCC 2.7.2 and EGCS 1998/05/28 snapshot.
! #include <iostream>
class some_base
{
*************** public:
*** 31,37 ****
class some_derived::func(derived_func_args &a) // ERROR - illegal member syntax
{
! cout << a.i << ' ' << a.f << endl;
}
int
--- 31,37 ----
class some_derived::func(derived_func_args &a) // ERROR - illegal member syntax
{
! std::cout << a.i << ' ' << a.f << std::endl;
}
int
Index: testsuite/g++.old-deja/g++.robertl/eb41.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb41.C,v
retrieving revision 1.3
diff -c -p -r1.3 eb41.C
*** eb41.C 2000/06/12 23:48:13 1.3
--- eb41.C 2001/04/06 21:51:57
***************
*** 1,8 ****
! #include <iostream.h>
! #include <iterator.h>
#include <string>
! ostream_iterator<std::string> oo(cout);
int main()
{
--- 1,8 ----
! #include <iostream>
! #include <iterator>
#include <string>
! std::ostream_iterator<std::string> oo(std::cout);
int main()
{
Index: testsuite/g++.old-deja/g++.robertl/eb44.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C,v
retrieving revision 1.6
diff -c -p -r1.6 eb44.C
*** eb44.C 2000/10/26 23:17:34 1.6
--- eb44.C 2001/04/06 21:51:57
***************
*** 4,12 ****
// Also, the template instantiation does not provide the missing
// friend function, the non-template function does
! #include <stdio.h>
! #include <stdlib.h>
! #include <iostream.h>
template <class T>
class Vector
--- 4,14 ----
// Also, the template instantiation does not provide the missing
// friend function, the non-template function does
! #include <cstdio>
! #include <cstdlib>
! #include <iostream>
!
! using namespace std;
template <class T>
class Vector
Index: testsuite/g++.old-deja/g++.robertl/eb46.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb46.C,v
retrieving revision 1.3
diff -c -p -r1.3 eb46.C
*** eb46.C 1998/12/16 22:04:04 1.3
--- eb46.C 2001/04/06 21:51:57
***************
*** 1,4 ****
! #include <iostream.h>
class A1 {
friend class B;
--- 1,4 ----
! #include <iostream>
class A1 {
friend class B;
*************** int main()
*** 22,27 ****
A1* a=new A3;
B b(a);
! if (b.itsA) cout << "cast ok" << endl; else cout << "cast failed" << endl;
return 0;
}
--- 22,30 ----
A1* a=new A3;
B b(a);
! if (b.itsA)
! std::cout << "cast ok" << std::endl;
! else
! std::cout << "cast failed" << std::endl;
return 0;
}
Index: testsuite/g++.old-deja/g++.robertl/eb54.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb54.C,v
retrieving revision 1.3
diff -c -p -r1.3 eb54.C
*** eb54.C 2000/05/28 05:38:02 1.3
--- eb54.C 2001/04/06 21:51:57
***************
*** 1,8 ****
! #include <iomanip.h>
! #include <stdlib.h>
int main()
{
! cout << setbase(3) << endl;
! exit (0);
}
--- 1,9 ----
! #include <iomanip>
! #include <iostream>
! #include <cstdlib>
int main()
{
! std::cout << std::setbase(3) << std::endl;
! std::exit (0);
}
Index: testsuite/g++.old-deja/g++.robertl/eb55.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb55.C,v
retrieving revision 1.4
diff -c -p -r1.4 eb55.C
*** eb55.C 2000/11/22 23:10:04 1.4
--- eb55.C 2001/04/06 21:51:57
***************
*** 2,12 ****
// Since the constructor is in streambuf.h, additional diagnostics are
// produced, which are not really supported in the old-deja framework
! #include <strstream.h>
void
t( char* buf )
{
! istrstream str = buf; //ERROR - inaccessible copy constructor
}
--- 2,12 ----
// Since the constructor is in streambuf.h, additional diagnostics are
// produced, which are not really supported in the old-deja framework
! #include <sstream>
void
t( char* buf )
{
! std::istrstream str = buf; //ERROR - inaccessible copy constructor
}
Index: testsuite/g++.old-deja/g++.robertl/eb66.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb66.C,v
retrieving revision 1.3
diff -c -p -r1.3 eb66.C
*** eb66.C 1998/12/16 22:04:25 1.3
--- eb66.C 2001/04/06 21:51:57
***************
*** 1,5 ****
! #include <assert.h>
! #include <iostream.h>
int bar ()
{
--- 1,5 ----
! #include <cassert>
! #include <iostream>
int bar ()
{
*************** int main ()
*** 17,22 ****
{
}
! // cout << "i = " << i << endl;
assert (i == 0) ;
}
--- 17,26 ----
{
}
! // std::cout << "i = " << i << std::endl;
assert (i == 0) ;
}
+
+
+
+
Index: testsuite/g++.old-deja/g++.robertl/eb73.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb73.C,v
retrieving revision 1.3
diff -c -p -r1.3 eb73.C
*** eb73.C 1999/10/01 04:31:00 1.3
--- eb73.C 2001/04/06 21:51:57
***************
*** 1,7 ****
// Special g++ Options: -O -Wall
// Depletes VM.
! #include <iostream.h>
#include <list>
#include <algorithm>
using namespace std;
--- 1,7 ----
// Special g++ Options: -O -Wall
// Depletes VM.
! #include <iostream>
#include <list>
#include <algorithm>
using namespace std;
Index: testsuite/g++.old-deja/g++.robertl/eb77.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C,v
retrieving revision 1.4
diff -c -p -r1.4 eb77.C
*** eb77.C 2000/11/22 19:05:42 1.4
--- eb77.C 2001/04/06 21:51:57
***************
*** 1,15 ****
! #include <stream.h>
! #include <strstream.h>
using namespace std;
int
main(int, char* [])
{
! strstream s;
s << "line 1\nline 2\n\nline 4";
! s << ends;
int nLine = 0;
--- 1,15 ----
! #include <iostream>
! #include <sstream>
using namespace std;
int
main(int, char* [])
{
! stringstream s;
s << "line 1\nline 2\n\nline 4";
! s << std::ends;
int nLine = 0;
*************** main(int, char* [])
*** 22,28 ****
}
++nLine;
! cout << nLine << ": " << line << endl;
if( nLine > 10 ) { // stop infinite loop
break;
--- 22,28 ----
}
++nLine;
! std::cout << nLine << ": " << line << std::endl;
if( nLine > 10 ) { // stop infinite loop
break;
Index: testsuite/g++.old-deja/g++.robertl/eb79.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C,v
retrieving revision 1.3
diff -c -p -r1.3 eb79.C
*** eb79.C 1998/12/16 22:04:38 1.3
--- eb79.C 2001/04/06 21:51:57
***************
*** 1,5 ****
// Makes bogus x86 assembly code.
! #include <iostream.h>
template<class T>
T max(T a, T b)
--- 1,7 ----
// Makes bogus x86 assembly code.
! #include <iostream>
!
! using namespace std;
template<class T>
T max(T a, T b)
Index: testsuite/g++.old-deja/g++.robertl/eb83.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb83.C,v
retrieving revision 1.3
diff -c -p -r1.3 eb83.C
*** eb83.C 1999/04/08 03:52:31 1.3
--- eb83.C 2001/04/06 21:51:57
***************
*** 1,7 ****
// Skip if not native
// Special g++ Options: -fprofile-arcs -ftest-coverage
void
! swap(int& x, int& y) throw()
{
int tmp = x;
x = y;
--- 1,7 ----
// Skip if not native
// Special g++ Options: -fprofile-arcs -ftest-coverage
void
! test_swap(int& x, int& y) throw()
{
int tmp = x;
x = y;
*************** main()
*** 12,16 ****
{
int i = 5;
int j = 7;
! swap(i, j);
}
--- 12,16 ----
{
int i = 5;
int j = 7;
! test_swap(i, j);
}
Index: testsuite/g++.old-deja/g++.warn/iomanip.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.warn/iomanip.C,v
retrieving revision 1.1
diff -c -p -r1.1 iomanip.C
*** iomanip.C 2000/01/25 17:15:58 1.1
--- iomanip.C 2001/04/06 21:51:57
***************
*** 3,12 ****
// Special g++ Options: -O -Winline
// Build don't link:
! #include <iomanip.h>
void
f()
{
! cout << setw(3);
}
--- 3,13 ----
// Special g++ Options: -O -Winline
// Build don't link:
! #include <iomanip>
! #include <iostream>
void
f()
{
! std::cout << std::setw(3);
}
More information about the Gcc-patches
mailing list