Article View: gnu.g++.bug
Article #1079gcc-2.3.1: no member function `istream: :operator >>'
From: Britt Levy
Date: Thu, 05 Nov 1992 18:41
Date: Thu, 05 Nov 1992 18:41
40 lines
2321 bytes
2321 bytes
The following code was written to narrow down a compiler error found
when trying to compile Rogue Wave's Tools H++ with gcc-2.3.1 and
iostream.h from libg++-2.2. The code compiles and runs correctly
using SCO/HCR's port of cfront 2.1 and their iostream.h.
// g++ -v -g -O cinop.C -o cinop
#include <iostream.h>
main()
{
int anInt;
cin >> anInt; // ok
cout << anInt << endl;
cout.operator<<(anInt); // error: no member function
// `ostream::operator <<'
cin.operator>>(anInt); // error: no member function
// `istream::operator >>'
cout << anInt << endl;
}
cd /blevy/c++/bugtest/
g++ -v -g -O cinop.C -o cinop
Reading specs from /files/vol/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.1/specs
gcc version 2.3.1
/files/vol/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -D__OPTIMIZE__ -g cinop.C /usr/tmp/cca02974.i
GNU CPP version 2.3.1 (sparc)
/files/vol/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.1/cc1plus /usr/tmp/cca02974.i -quiet -dumpbase cinop.cc -g -O -version -o /usr/tmp/cca02974.s
GNU C++ version 2.3.1 (sparc) compiled by GNU C version 2.3.1.
cinop.C: In function `int main ()':
cinop.C:10: no member function `ostream::operator <<'
cinop.C:12: no member function `istream::operator >>'
Compilation exited abnormally with code 1 at Thu Nov 5 11:59:50
------------------------------------------------------------------
Britt Levy, NEC AMERICA INC 1525 W WALNUT HILL LN
blevy@esd.dl.nec.com IRVING TX 75038-3793
Phone: (214) 518-3829
------------------------------------------------------------------
Technical Details
Message-ID:
<9211051841.AA03020@flamingo.esd.dl.nec.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!esd.dl.nec.COM!blevyShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!esd.dl.nec.COM!blevy From: blevy@esd.dl.nec.COM (Britt Levy) Subject: gcc-2.3.1: no member function `istream: :operator >>' Message-ID: <9211051841.AA03020@flamingo.esd.dl.nec.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 5 Nov 1992 18:41:27 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 41