This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: `set_new_handler' missing in libstdc++.2.9.0 of egcs-1.1b on sco-3.2v5.0.4


Hi,

The problem was an old libg++ include file that defined
`set_new_handler' with a C prototype. However, it was included *instead*
of the libstdc++ one. The preprocessed (gcc -E) offending file output
give:

   # 317
"/usr/local/lib/gcc-lib/i586-pc-sco3.2v5.0.4/egcs-2.91.57/include/stddef.h
   # 6 "/usr/local/lib/g++-include/std/cstddef.h" 2 3
   # 11 "/usr/local/lib/g++-include/std/new.h" 2 3

   extern "C++" {
   typedef void (*new_handler)();
   extern "C" new_handler set_new_handler (new_handler);

After removing the stray /usr/local/lib/g++-include:

   # 9
"/usr/local/lib/gcc-lib/i586-pc-sco3.2v5.0.4/egcs-2.91.57/include/new" 2
3

   extern "C++" {

     class bad_alloc : public exception {
     public:
       virtual const char* what() const throw() { return "bad_alloc"; }
     };
    
     struct nothrow_t {};
     extern const nothrow_t nothrow;
     typedef void (*new_handler)(); 
     new_handler set_new_handler (new_handler);

The compile command *did not* explicitly include
/usr/local/lib/gcc-include, however, it was present when egcs was built.

   c++ -v -c  -fPIC -I. -I/src/compilers/octave-2.1.8/liboctave -I..
-I../liboctave -I../src -I../libcruft/misc -I/src/compilers/octave-2.1.8
-I/src/compilers/octave-2.1.8/liboctave
-I/src/compilers/octave-2.1.8/src
-I/src/compilers/octave-2.1.8/libcruft/misc   -DHAVE_CONFIG_H -mieee-fp
-fno-rtti -fno-exceptions -fno-implicit-templates -O3
/src/compilers/octave-2.1.8/liboctave/oct-alloc.cc -o pic/oct-alloc.o

Is this normal or is my fault having an old and incompatible libg++?

Thanks,
Joao
-- 
Joao Cardoso, INESC  |  e-mail:
R. Jose Falcao 110   |  tel:    + 351 2 2094345
4050 Porto, Portugal |  fax:    + 351 2 2008487


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]