🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #11

GCC-2.3.1 fails to build libg++2.2 under NeXTstep 3.0

#11
From: Magnus Nordborg
Date: Tue, 03 Nov 1992 11:46
123 lines
5380 bytes
I'm trying to build libg++2.2 on a NeXT running NeXTstep 3.0 using a  
freshly installed gcc-2.3.1. The compile fails due to parse error.

I did:

# ./configure next
Created "Makefile" in /usr/local/src/libg++-2.2
# cd libg++
# make all CFLAGS='-g -O2'
rootme=`pwd` ; export rootme; CC="`if [ -f ${rootme}/../gcc/gcc ] ;   
then echo ${rootme}/../gcc/gcc\\ -B${rootme}/../gcc/ ;  else echo gcc  
; fi` `if [ -f ${rootme}/../gcc/gcc ] ;  then echo  
-I${rootme}/../gcc/include ;  else echo ; fi`"; export CC;   
utils/gen-params  >tmp-params.h
mv tmp-params.h _G_config.h
gcc -g -O2 -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include   
-c AllocRing.cc
gcc -g -O2 -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include   
-c Obstack.cc
gcc -g -O2 -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include   
-c builtin.cc
gcc -g -O2 -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include   
-c regex.cc
gcc -g -O2 -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include   
-c Regex.cc
Regex.cc: In method `Regex::Regex (const char *, int (=  0 ), int (=   
40 ), const char * (=  0 ))':
Regex.cc:52: warning: ANSI C++ forbids implicit conversion from `void  
*' in assignment
Regex.cc:59: warning: ANSI C++ forbids implicit conversion from `void  
*' in assignment
gcc -g -O2 -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include   
-c String.cc
In file included from ./../iostream/iostream.h:25, from  
./../iostream/stream.h:7, from ./String.h:26, from String.cc:25:
./../iostream/streambuf.h:359: warning: type specifier omitted for  
parameter
./../iostream/streambuf.h:359: parse error before `,'
./../iostream/streambuf.h:360: warning: type specifier omitted for  
parameter
./../iostream/streambuf.h:360: parse error before `)'
In file included from ./../iostream/stream.h:7, from ./String.h:26,  
from String.cc:25:
./../iostream/iostream.h:60: warning: type specifier omitted for  
parameter
./../iostream/iostream.h:60: parse error before `)'
./../iostream/iostream.h:152: warning: type specifier omitted for  
parameter
./../iostream/iostream.h:152: parse error before `)'
./../iostream/iostream.h:225: warning: type specifier omitted for  
parameter
./../iostream/iostream.h:225: parse error before `)'
./../iostream/iostream.h:247: warning: type specifier omitted for  
parameter
./../iostream/iostream.h:247: parse error before `)'
./../iostream/iostream.h: In method `class streambuf::istream&  
iostream::vscan (...)':
./../iostream/iostream.h:226: `format' undeclared (first use this  
function)
./../iostream/iostream.h:226: (Each undeclared identifier is reported  
only once
./../iostream/iostream.h:226: for each function it appears in.)
./../iostream/iostream.h:226: `args' undeclared (first use this  
function)
./../iostream/iostream.h:226: warning: control reaches end of  
non-void function
./../iostream/iostream.h: In method `class ostream& iostream::vform  
(...)':
./../iostream/iostream.h:248: `format' undeclared (first use this  
function)
./../iostream/iostream.h:248: `args' undeclared (first use this  
function)
./../iostream/iostream.h:248: warning: control reaches end of  
non-void function
*** Exit 1
Stop.
*** Exit 1
Stop.

The offending lines 359-360 in "./../iostream/streambuf.h" are:
    

    int vscan(char const *fmt0, _G_va_list ap, ios::iostate* = NULL);
    int vform(char const *fmt0, _G_va_list ap);

and the lines in "./../iostream/iostream.h" are:
60:     ostream& vform(const char *format, _G_va_list args);
152:    istream& vscan(const char *format, _G_va_list args);
225:    istream& vscan(const char *format, _G_va_list args)
226:        { return ((istream*)this)->vscan(format, args); }
247:    ostream& vform(const char *format, _G_va_list args)
248:        { return ((ostream*)this)->vform(format, args); }

I have examined the preprocessor output using the -E option:

# grep vscan /tmp/cpp.out 

    int vscan(char const *fmt0, __gnuc_va_list  ap, ios::iostate* =  
((void*)0) );
    istream& vscan(const char *format, __gnuc_va_list  args);
    istream& vscan(const char *format, __gnuc_va_list  args)
        { return ((istream*)this)->vscan(format, args); }
# grep vform /tmp/cpp.out
    int vform(char const *fmt0, __gnuc_va_list  ap);
    ostream& vform(const char *format, __gnuc_va_list  args);
    ostream& vform(const char *format, __gnuc_va_list  args)
        { return ((ostream*)this)->vform(format, args); }

The definition appears in  
/usr/local/src/libg++-2.2/libg++/_G_config.h:

#define _G_va_list __gnuc_va_list

Thanks, Magnus
---


		Magnus Nordborg
		Department of Biological Sciences
		Stanford University
		magnus@fisher.stanford.edu (NeXT mail preferred)
    	    	+1 (415) 723-4952 (office)
    	    	+1 (415) 948-7321 (home)
Technical Details
Message-ID: <9211040346.AA09291@fisher.Stanford.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!fisher.stanford.edu!magnus

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!fisher.stanford.edu!magnus
From: magnus@fisher.stanford.edu (Magnus Nordborg)
Newsgroups: gnu.g++.lib.bug
Subject: GCC-2.3.1 fails to build libg++2.2 under NeXTstep 3.0
Message-ID: <9211040346.AA09291@fisher.Stanford.EDU>
Date: 3 Nov 92 11:46:54 GMT
Article-I.D.: fisher.9211040346.AA09291
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 123
Approved: bug-lib-g++@prep.ai.mit.edu