Bug 20259 - iostream functions/methods declared
Summary: iostream functions/methods declared
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 3.3.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-01 04:43 UTC by ramya
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: Linux 2.4.7-10
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
This String.cc file is part of the GNU C++ library (6.39 KB, application/octet-stream)
2005-03-01 04:49 UTC, ramya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ramya 2005-03-01 04:43:49 UTC
Environment     : i686-pc-linux-gnu
Compiler Version: GCC 3.3.2 
Kernel Version  : 2.4.7-10

I am compiling a "String.cc" file. It is giving the below given error.

But, I could see the ipfx function being defined in 'iostream.h" and the
"iostream.h" is being included in the corresponding header file "String.h"

======== Rebuilding "String.o" ========
        /cm4/tools/GNU/src/gcc/Linux_2.4.7-10/bin/g++ -DHOST_ARCH_LINUX
-I../include -I. -DSOLARIS2 -DCPP_LOCATION=\"\" -DIDL_CFE_VERSION=\"1.3.0\" 
-fpermissive -Wno-deprecated -c String.cc -o String.o

String.cc: In function `std::istream& operator>>(std::istream&, String&)':
String.cc:1195: error: `ipfx' undeclared (first use this function)
String.cc:1195: error: (Each undeclared identifier is reported only once for 
   each function it appears in.)
String.cc:1217: warning: invalid conversion from `int' to `std::_Ios_Iostate'
String.cc:1217: warning:   initializing argument 1 of `void 
   std::basic_ios<_CharT, _Traits>::clear(std::_Ios_Iostate) [with _CharT = 
   char, _Traits = std::char_traits<char>]'
String.cc: In function `int readline(std::istream&, String&, char, int)':
String.cc:1223: error: `ipfx' undeclared (first use this function)
*** Error code 1
clearmake: Error: Build script failed for "String.o"
========================================================

And I could see, the ipfx function is being optimized in iostream.h. Is that
creating the problem.

Any idea, Why this problem is happening with GCC 3.3.2. 

NOTE: I am able to compile the same code with GCC 2.95.3
Comment 1 ramya 2005-03-01 04:49:05 UTC
Created attachment 8301 [details]
This String.cc file is part of the GNU C++ library

I am herewith attaching the String.cc file where the compilation was failing
Comment 2 Andrew Pinski 2005-03-01 04:55:58 UTC
ipfx is non standard so closing as such.
Also read the following thread:
http://gcc.gnu.org/ml/libstdc++/2001-02/msg00329.html

which explains why ipfx existed in libstdc++-v2 and not in libstdc++-v3.

You might want to update your source to use std::string instead of this pre-standard class.