Thread View: gnu.g++.lib.bug
2 messages
2 total messages
Started by niemira.jim
Mon, 20 Jul 1992 13:06
losing compile on DEC5000 w/ g++2.2.2
Author: niemira.jim
Date: Mon, 20 Jul 1992 13:06
Date: Mon, 20 Jul 1992 13:06
49 lines
2649 bytes
2649 bytes
Gentle Readers, While attempting to compile libg++-2.2 with gcc-2.2.2 on a DECstation 5000/240 (and DECstation 5000/125) running Ug^Hltrix4.2A, I came across the following: >Script started on Mon Jul 20 15:02:17 1992 >94 rooney>gmake >gmake[1]: Nothing to be done for `all'. >/local/sys/src/libg++-2.2/libg++/../gcc/gcc -B/local/sys/src/libg++-2.2/libg++/../gcc/ -g -I. -I.. -I. -I./../src -I./../g++-include -c -I/local/sys/src/libg++-2.2/libg++/../gcc/include sbufvform.C >sbufvform.C: In method `int streambuf::vform (const char *, char *)': >sbufvform.C:248: warning: implicit declaration of function `__builtin_alignof' >sbufvform.C:248: parse error before `4' >sbufvform.C:248: parse error before `4' >sbufvform.C:248: parse error before `[' >#... >#similarly for lines 260, 300, 309, 323,370, 380, 392, 398, 422, 427 >#... >gmake[1]: *** [sbufvform.o] Error 1 >gmake: *** [in-io] Error 1 >95 rooney>^D >script done on Mon Jul 20 15:02:27 1992 I have traced this to the macro expansion of va_arg in /usr/include/stdarg.h, which looks like this: > /* va_arg aligns list and points past data */ >#define va_arg(list, mode) ((mode *)(list =\ > (va_list) ((((int)list + (__builtin_alignof(mode)<=4?3:7)) &\ > (__builtin_alignof(mode)<=4?-4:-8))+sizeof(mode))))[-1] which results in line 248 of sbufvform.C being translated into: > if ((width = ((int *)(ap = (va_list) ((((int)ap + (__builtin_alignof(int)<=4?3:7)) & (__builtin_alignof(int)<=4?-4:-8))+sizeof(int))))[-1]) >= 0) The implicit declaration error is (I believe) because the 'ccom' part of DEC's C compiler contains '__builtin_alignof' (detected via a 'strings'), while gcc/g++ does not. The string appears in no other part of the compiler, nor in any other file under /usr/include[/sys]. a) Am I doing anything wrong? b) I expect the problem is the way DEC has their stdarg.h written (go figure). Is this inconsistent with other OS's stdarg.h's? (I have no other boxes to compare to) c) Any clues? Anyone? | . . ) / | It breathes fire. -more- | Jim Niemira | (_(_/ | | It breathes fire. -more- | Senior SysOp, Frontier Sci | ( ' | You are not happy. -more- | niemira@karloff.fstrf.org
Re: losing compile on DEC5000 w/ g++2.2.2
Author: bothner
Date: Mon, 20 Jul 1992 07:19
Date: Mon, 20 Jul 1992 07:19
11 lines
866 bytes
866 bytes
> I have traced this to the macro expansion of va_arg in /usr/include/stdarg.h, > which looks like this: You've installed gcc wrong. gcc/g++ should not be using /usr/include/stdarg.h. You should use the GNU version of stdarg.h (whose source is gcc/gstdarg.h and gcc/va-*.h). This is supposed to be installed by the gcc install procedure in a place where gcc can fnd it. --Per Bothner Cygnus Support bothner@cygnus.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads