🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1291

Problem w/ included files on sparc w/ gcc 2.3.1

#1291
From: Michael Gerlek
Date: Fri, 06 Nov 1992 16:35
38 lines
1930 bytes
PROBLEM: libg++-2.2 won't compile on sparc (os 4.1.2) using gcc-2.3.1

(In fact it's not just libg++, but anything using the right (wrong)
combination of include files, I think, will choke.)

DETAILS: Sam Leffler (sam@sgi.com) reported a few days ago he couldn't
compile libg++ either, using gcc 2.2.2.  The make proceeeds along
until the actual libg++ sources are compiled, and then

> gcc -g -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c AllocRing.cc
> In file included from ./../g++-include/sys/types.h:15, from /usr/include/unistd.h:72, 
> from ./../g++-include/unistd.h:25, from ./std.h:28, from AllocRing.cc:22:
> /usr/include/sys/types.h:24: conflicting types for `wchar_t'
> ./../g++-include/stddef.h:11: previous declaration of `wchar_t'
> *** Error code 1
> make: Fatal error: Command failed for target `AllocRing.o'

He very kindly provided me the following patch:

> change /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/include/stddef.h
> 
> #ifdef __GNUG__
> /* In C++, wchar_t is a distinct basic type,
>    and we can expect __wchar_t to be defined by cc1plus.  */
> typedef unsigned short wchar_t;	/* CHANGED LINE */
> #else
> 
> (~40 lines from the bottom).

Does anyone have any other details on this?  Is this really a bug in
the configuration of gcc, or did I (and, presumably, Sam) screw up
installing gcc?

Thanks for some great tools...
--

-[mpg]
 gerlek@cse.ogi.edu
Technical Details
Message-ID: <45371@ogicse.ogi.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!bu.edu!att!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!dat.cse.ogi.edu!gerlek

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!bu.edu!att!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!dat.cse.ogi.edu!gerlek
From: gerlek@dat.cse.ogi.edu (Michael Gerlek)
Newsgroups: gnu.gcc.bug
Subject: Problem w/ included files on sparc w/ gcc 2.3.1
Message-ID: <45371@ogicse.ogi.edu>
Date: 6 Nov 92 16:35:03 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: Tanasbourne Graduate Institute -- Beaverton, Oregon
Lines: 38
Approved: bug-gcc@prep.ai.mit.edu