🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #40

gcc-2.3.1: two little bugs with mips-mips-sysv

#40
From: Klaus Steinberger
Date: Mon, 02 Nov 1992 21:24
71 lines
2657 bytes
There are two little bugs in the mips-mips-sysv world in gcc-2.3.1

1. mips-tdump.c fails to compile with mips-mips-sysv, because of
   index undefined in the SYMR structure. (mips-mips-bsd compiles ok).
   This is due to a "#undef index" at the inappropriate place.
   The #undef must happen straigth after the include of config.h
   and before sym.h would be included.

2. SIZE_TYPE isn't correct in the mips-mips-sysv environment.
   At least EP/IX 1.4.3 (which is basically RISCos 4.52) defines
   size_t as unsigned int.

Here is the patch:

Index: gcc-2.3.1/mips-tdump.c
*** gcc-2.3.1/mips-tdump.c.orig	Mon Nov  2 13:34:12 1992
--- gcc-2.3.1/mips-tdump.c	Mon Nov  2 13:45:12 1992
***************
*** 26,31 ****
--- 26,36 ----
  #include <errno.h>
  #include "config.h"
  
+ #ifdef index
+ #undef index
+ #undef rindex
+ #endif
+ 
  #ifndef CROSS_COMPILE
  #include <a.out.h>
  #else
***************
*** 59,70 ****
  #define ushort	unsigned short
  #define uint	unsigned int
  #define ulong	unsigned long
- 
- #ifdef index
- #undef index
- #undef rindex
- #endif
- 
  
  /* Do to size_t being defined in sys/types.h and different
     in stddef.h, we have to do this by hand.....  Note, these
--- 64,69 ----
Index: gcc-2.3.1/config/mips-sysv.h
*** gcc-2.3.1/config/mips-sysv.h.orig	Mon Nov  2 15:43:01 1992
--- gcc-2.3.1/config/mips-sysv.h	Mon Nov  2 15:43:37 1992
***************
*** 70,73 ****
--- 70,76 ----
  /* Generate calls to memcpy, etc., not bcopy, etc.  */
  #define TARGET_MEM_FUNCTIONS
  
+ /* Mips SYSTYPE_SYSV has typedef unsigned int size_t */
+ #define SIZE_TYPE	"unsigned int"
+ 
  #include "mips.h"

Sincerely,
Klaus Steinberger

P.S: Congratulations for this Compiler, seems to be stable now on MIPS
     Platform, I was able to compile groff-1.06 as well as libg++-2.2
     which the previous gcc-2.x version mostly failed to compile.
--
Klaus Steinberger               Beschleunigerlabor der TU und LMU Muenchen
Phone: (+49 89)3209 4287        Hochschulgelaende
FAX:   (+49 89)3209 4280        D-8046 Garching, Germany
Internet: Klaus.Steinberger@Physik.Uni-Muenchen.DE
Technical Details
Message-ID: <k2.720739441@woodstock>
Path: arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!hri.com!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bl.physik.tu-muenchen.de!k2

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!hri.com!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bl.physik.tu-muenchen.de!k2
From: k2@bl.physik.tu-muenchen.de (Klaus Steinberger)
Newsgroups: gnu.gcc.bug
Subject: gcc-2.3.1: two little bugs with mips-mips-sysv
Message-ID: <k2.720739441@woodstock>
Date: 2 Nov 92 21:24:01 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
Lines: 71
Approved: bug-gcc@prep.ai.mit.edu