🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #53490

Building 1.40 on SCO

#53490
From: Tim Russell
Date: Sun, 29 Dec 1991 22:29
41 lines
2268 bytes
Hello all,

    Since I've been unable to locate the binaries for gcc 1.40 for SCO, I
decided to be adventurous and attempt to compile it myself.  I get up to
the part in stage1 where it builds the gnulib2 library with the new gcc.
Then cpp started acting up, dumping core with a SIGIOT signal.

    Poking through cccp.c showed me that the problem was in expand_to_temp_
buffer.  It's called with two pointers, one to the start and one to the end
of a buffer.  The first thing it does is check that the end is greater than
the start, and it always comes out thinking that it's not and calls an abort().
This code is near line 2021 of cccp.c.  I have a feeling the problem has to
do with the fact that two pointers to unsigned chars are being treated as
integers for the subtraction.

    Here's the offending code (from memory):

expand_to_temp_buffer(buf, limit, output_marks);
U_CHAR *buf, *limit;
{
	[...]
	int length = limit - buf;

	if (length < 0)
		abort();

    Where U_CHAR is typedef'd to an unsigned char.

    I tried changing the initializer for length to an actual statement, but
that wasn't it.

    Is this a bug in other architectures?  I would say that it is a problem
with the SCO compiler, but this isn't coming up until the stage1 stage when
the newly-compiled GCC is the one doing the compiling.

    I'd appreciate any help greatly!  Thanks.

--
   Tim Russell               Omaha, NE           trussell@isis.cs.du.edu
   "They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety."  -  Benjamin Franklin
Technical Details
Message-ID: <1991Dec29.222958.11112@mnemosyne.cs.du.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!mnemosyne.cs.du.edu!isis.cs.du.edu!trussell

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,7857f8b316e3adbc,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1991-12-29 14:32:16 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!mnemosyne.cs.du.edu!isis.cs.du.edu!trussell
From: trussell@isis.cs.du.edu (Tim Russell)
Newsgroups: gnu.gcc.help
Subject: Building 1.40 on SCO
Summary: cccp abort()s in expand_to_temp_buffer
Keywords: cccp
Message-ID: <1991Dec29.222958.11112@mnemosyne.cs.du.edu>
Date: 29 Dec 91 22:29:58 GMT
Sender: usenet@mnemosyne.cs.du.edu (netnews admin account)
Organization: University of Denver, Dept. of Math & Comp. Sci.
Lines: 41