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
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
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.