home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.g++.lib.bug
- Path: sparky!uunet!cis.ohio-state.edu!rooney.fstrf.ORG!niemira
- From: niemira@rooney.fstrf.ORG (niemira.jim)
- Subject: losing compile on DEC5000 w/ g++2.2.2
- Message-ID: <9207202106.AA13580@rooney.fstrf.org>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Mon, 20 Jul 1992 13:06:58 GMT
- Approved: bug-lib-g++@prep.ai.mit.edu
- Lines: 50
-
- 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
-
-