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


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

re[2]: alpha-dec-osf5.0 Can't compile libstdc++-v3/libsupc++/pure.cc


Benjamin,

Thanks for the attempt, but I am still having problems.

This starting to look like a C++ 3.0 problem to me, not a libstdc++ problem, so let me know if I need to ask for help in different mailing list.  In particular, I suspect one or more of the 'fixed' include files is incorrect.

I have done some more trouble shooting which is described below, so please read on if this is the right place for me to be getting help.


Anyway now I get the below:

-----------------
/usr/local/src/gcc.devel/gcc/objdir-gcc/gcc/g++ -B/usr/local/src/gcc.devel/gcc/objdir-gcc/gcc/ -nostdinc++ -L/usr/local/src/gcc.devel/gcc/objdir-gcc/alpha-dec-osf5.0/libstdc++-v3/src -L/usr/local/src/gcc.devel/gcc/objdir-gcc/alpha-dec-osf5.0/libstdc++-v3/src/.libs -B/usr/local/alpha-dec-osf5.0/bin/ -B/usr/local/alpha-dec-osf5.0/lib/ -isystem /usr/local/alpha-dec-osf5.0/include -I../../../../libstdc++-v3/../gcc -I../../../../libstdc++-v3/../include -I../../../../libstdc++-v3/include -I../../../../libstdc++-v3/include/std -I../../../../libstdc++-v3/include/c_std -I../include -I../../../../libstdc++-v3/libsupc++ -g -O2 -mieee -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -g -c ./../../../libstdc++-v3/libsupc++/pure.cc   -DPIC -o pure.o

/usr/local/src/gcc.devel/gcc/objdir-gcc/gcc/include/stdio.h: In function `void 
   __cxa_pure_virtual()':

/usr/local/src/gcc.devel/gcc/objdir-gcc/gcc/include/stdio.h:245: too many 
   arguments to function `int fputs()'

../../../../libstdc++-v3/libsupc++/pure.cc:53: at this point in file

make[3]: *** [pure.lo] Error 1
------------------

line 245 of stdio.h is:    extern int      fputs __((const char *, FILE *));
line 53 of pure.cc is:     writestr ("pure virtual method called\n");

and the pertinent lines of output from compiling the above with -E is:

# 242 "/usr/local/src/gcc.devel/gcc/objdir-gcc/gcc/include/stdio.h" 3
extern int fgetc ();
extern char *fgets ();
extern int fputc ();
extern int fputs ();
extern char *gets ();
extern int puts ();
extern int ungetc ();
extern int fseek ();


# 69 "/usr/local/src/gcc.devel/gcc/objdir-gcc/gcc/include/sys/types.h" 3
extern "C" {

extern "C" {

extern void __terminate(void) __attribute__ ((__noreturn__));

void
__cxa_pure_virtual (void)
{
  fputs("pure virtual method called\n", (&_iob[2]));
  __terminate ();
}

}

/ * EOF (End Of File) */
/*   - Added by me, but I want to be clear that there is nothing beyond the above, including no matching ' ' */
-----------------

I admit to being a little rusty on my C++, so I'm not clear as to what the problem is, but note that the 'extern "C" {' occurs twice, but is only terminated once.

Could that somehow be the culprit, and if so, is the problem likely in the fixed types.h file?


  >>  > 	libstdc++-v3/libsupc++/pure.cc

  >>  >    arguments to function `int write()'

  >>  just don't use the 

  >>   _GLIBCPP_HAVE_UNISTD_H

  >>  parts of this file.

  >>  (undef  _GLIBCPP_HAVE_UNISTD_H when compiling this file)

  >>  -benjamin

Thanks
Greg Freemyer


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