HDTenEightyP/NetNews huggingface dataset:
From: eggert@bi.TWinsun.COM (Paul Eggert)
Subject: signed char c = 256; long long x = 9223372036854775808ULL; (GCC 2.3.1)
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 12 Nov 1992 06:39:36 GMT

GCC 2.3.1 (sparc, SunOS 4.1.2) doesn't catch the signed integer overflows in
either of the following constant expression initializers.

	signed char c = 256;
	long long x = 9223372036854775808ULL;

The first line isn't diagnosed because force_fit_type yields a nonzero value
that isn't 1, and this value overflows when it is assigned to a 1-bit field.

The second line isn't diagnosed because the overflow occurs as a function of
changing the value from unsigned to signed; force_fit_type can't see this.

Here is a patch.  The last hunk of this patch fixes the second bug; the
rest of the patch fixes the first bug.

Thu Nov 12 05:32:24 1992  Paul Eggert  (eggert@twinsun.com)

	* fold-const.c (force_fit_type): Yield 0 or 1, so that result fits in
	a 1-bit field.
	(fold-convert): Report an overflow if a large unsigned long long value
	converts to a negative signed long long value.

===================================================================
RCS file: fold-const.c,v
retrieving revision 2.3.1.7
retrieving revision 2.3.1.8
diff -c -r2.3.1.7 -r2.3.1.8
*** fold-const.c	1992/11/10 19:20:24	2.3.1.7
--- fold-const.c	1992/11/12 05:32:24	2.3.1.8
***************
*** 117,123 ****
  /* Make the integer constant T valid for its type
     by setting to 0 or 1 all the bits in the constant
     that don't belong in the type.
!    Yield nonzero if a signed overflow occurs.
     If OVERFLOW is nonzero, a signed overflow has already occurred.  */
  
  static int
--- 117,123 ----
  /* Make the integer constant T valid for its type
     by setting to 0 or 1 all the bits in the constant
     that don't belong in the type.
!    Yield 1 if a signed overflow occurs, 0 otherwise.
     If OVERFLOW is nonzero, a signed overflow has already occurred.  */
  
  static int
***************
*** 175,182 ****
  
    /* Yield nonzero if signed overflow occurred.  */
    return
!     (overflow
!      | (low ^ TREE_INT_CST_LOW (t)) | (high ^ TREE_INT_CST_HIGH (t)) != 0);
  }
  
  /* Add two doubleword integers with doubleword result.
--- 175,182 ----
  
    /* Yield nonzero if signed overflow occurred.  */
    return
!     ((overflow | (low ^ TREE_INT_CST_LOW (t)) | (high ^ TREE_INT_CST_HIGH (t)))
!      != 0);
  }
  
  /* Add two doubleword integers with doubleword result.
***************
*** 1490,1495 ****
--- 1490,1497 ----
  	  TREE_TYPE (t) = type;
  	  TREE_CONSTANT_OVERFLOW (t) =
  	    (TREE_CONSTANT_OVERFLOW (arg1)
+ 	     | (TREE_INT_CST_HIGH (arg1) < 0
+ 		& TREE_UNSIGNED (type) < TREE_UNSIGNED (TREE_TYPE (arg1)))
  	     | force_fit_type (t, 0));
  	}
  #if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)

Newsgroups: gnu.gcc.bug
From: terryh@unixhub.slac.stanford.edu
Subject: library search path for GCC-2.3.1
Reply-To: terryh@unixhub.slac.stanford.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 9 Nov 1992 21:33:19 GMT

Hi, If this is a known problem, please ignore this bug report. When I compiled
a program with C++, it complained that libg++.a is not found unless I add
"-L/usr/local/lib" to the C++. It seems that GCC-2.3.1 lost track of the
default library search path, LIBRARY_PATH was also ignored. 

Thanks for the good work, the portability of GCC really helps a great deal.

-- 
Terry Hung - Stanford Linear Accelerator Center
phone: 415-926-3618
e-mail: terryh@unixhub.slac.stanford.edu 

Newsgroups: gnu.gcc.bug
From: ydavid@dxcern.cern.ch (Yann David)
Subject: from C++ to C
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 9 Nov 1992 18:18:09 GMT

		Hello !


I'd like to know whether there is a way to make g++
(GNU's C++ compiler) produce C code instead of a binary
executable program.

(I am interested in so doing for two reasons:
	1) I'd like to see what the result looks like;
	2) I am trying to write something with XDesigner
	   as well, and it seems that g++ doesn't compile
	   the code generated by XDesigner. Up to now, I've
	   used cc exclusively when compiling XDesigner-generated
	   C code. )

Thank you in advance for your help and advise !


yann DAVID,
student at CERN.
From: logan@penril.COM (James Logan)
Newsgroups: gnu.gcc.bug
Subject: more trouble
Date: 4 Nov 92 20:10:10 GMT
Article-I.D.: renny.9211042010.AA09802
Distribution: gnu
Organization: GNUs Not Usenet

I tried compiling GCC 2.3.1 with GCC 1.36 on a Sun SPARC and got
the following message:  

/usr/local/bin/gcc  -DIN_GCC   -g     -I. -I. -I./config \
  -DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/`sed -e 's/.*\"\
([^ \"]*\)[ \"].*/\1/' < ./version.c`/include\" \
  -DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" \
  -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
  -DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/`sed -e 's/.*\
"\([^ \"]*\)[ \"].*/\1/' < ./version.c`/sys-include\" \
  -DTOOLDIR=\"/usr/local/sparc-sun-sunos4.1/\" \
  -c `echo ./cccp.c | sed 's,^\./,,'`
as: "/usr/tmp/cca09766.s": , approx line 7349: internal assembler error: out of
memory
*** Error code 1
make: Fatal error: Command failed for target `cccp.o'


-- 
Jim Logan                  WORK: logan@penril.com
Penril Datacomm Networks   HOME: logan@gimlet.herndon.va.us
Newsgroups: gnu.gcc.bug
From: henryf@imagine.COM (Henry Flurry)
Subject: Warnings and %-sequences
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 11 Nov 1992 18:30:10 GMT

The program below generates the following warnings on NeXT's 3.0 compiler:

  stuff.c: In function `main':
  stuff.c:17: warning: precision and `0' flag both used in one %-sequence
  stuff.c:17: warning: precision and `0' flag both used in one %-sequence
  stuff.c:17: warning: precision and `0' flag both used in one %-sequence
  stuff.c:17: warning: precision and `0' flag both used in one %-sequence
  stuff.c:17: warning: precision and `0' flag both used in one %-sequence

a) I don't have gcc2.3.  Does it make these warnings?

b) I don't understand the purpose of these warnings in my usage of the %f  
sequence, although I see a potential purpose for them in a %d sequence.   
Am I missing something?

c) If the warnings are valid, is there another way to code my %f sequence  
so that I achieve the same results but don't get the warning?  (I want a  
minimum of an XX.XX field, zero padded, with the ability to have the left  
side expand)

- Thanks!

- Henry Flurry


### BEGIN ###

    /*
    **    File: stuff.c
    ** Compile: cc -Wall stuff.c -o stuff
    **     Run: stuff
    */

#include <stdio.h>

int main(void)
{
    printf("%05.2f\t%05.2f\t%05.2f\t%05.2f\t%05.2f\n",
    		(double)1.2,
		(double)12.3,
		(double)192834.39,
		(double)0.004,
		(double)10.01);
    return 0;
}

### END ###


Newsgroups: gnu.gcc.bug
From: marvinw@intrepid18.wv.tek.COM
Subject: gcc-2.3.1, scheduling and asm's
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 12 Nov 1992 22:18:26 GMT

We are using gcc-2.3.1 as a cross-compiler, the host is sparc and the target
is mips.  We are using a modified version of the OSF assembler.  In the 
following example you will find a missing nop before the coprocessor 
instruction, mtc2.  I would like to see the compiler issue a nop after
the	
	"lw	$2,y" 

just as it does for the

	"lw      $3,z"

		Marvin Wyckoff
		Tektronix, Inc.
		503-685-2985

/* ------------------------ asm2.c ------------------------ */
#define MTC2(src, reg)  _MTC2(src, reg)
#define _MTC2(src, reg) \
  { asm volatile ("mtc2 %0,"#reg"" : : "r" ((unsigned long) (src))); }
int y,z;
main()
{
	int x;

	x = y;
	MTC2(x,$3);
	y += z;
}
/* ------------------------ asm2.c ------------------------ */
Script started on Thu Nov 12 14:11:49 1992
intrepid% uname -a
SunOS intrepid 4.1A.1 4.1.1 sun4
intrepid% cat ~/gnu/gcc-2.3.1/sparc-mips/config.status
#!/bin/sh
# GCC was configured as follows:
../configure --host=sparc --target=mips-mips-bsd
echo host=sparc-sun-sunos4.1.1 target=mips-mips-bsd build=sparc-sun-sunos4.1.1
intrepid% ~/nwd/tools/sparc/bin/mgcc -O2 -S -v asm2.c
gcc version 2.3.1
 /home/marvinw/nwd/tools/sparc/lib/gcc-lib/mips-mips-bsd/2.3.1/cpp -lang-c -v -undef -D__GNUC__=2 -Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43 -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43 -D__mips__ -D__unix__ -D__host_mips__ -D__MIPSEB__ -D__R3000__ -D__SYSTYPE_BSD43__ -D___mips__ -D___unix__ -D___host_mips__ -D___MIPSEB__ -D___R3000__ -D___SYSTYPE_BSD43__ -D__mips -D__unix -D__host_mips -D__MIPSEB -D__R3000 -D__SYSTYPE_BSD43 -D___mips -D___unix -D___host_mips -D___MIPSEB


 -D___R3000 -D___SYSTYPE_BSD43 -D__OPTIMIZE__ -D__LANGUAGE_C -D_LANGUAGE_C -DLANGUAGE_C asm2.c /usr/tmp/cca13703.i
GNU CPP version 2.3.1 [AL 1.1, MM 28] BSD Mips
 /home/marvinw/nwd/tools/sparc/lib/gcc-lib/mips-mips-bsd/2.3.1/cc1 /usr/tmp/cca13703.i -mgas -mgpopt -quiet -dumpbase asm2.c -O2 -version -o asm2.s
GNU C version 2.3.1 [AL 1.1, MM 28] BSD Mips compiled by CC.
intrepid% cat asm2.s
	.file	1 "asm2.c"

 # GNU C 2.3.1 [AL 1.1, MM 28] BSD Mips compiled by CC

 # Cc1 defaults:

 # Cc1 arguments (-G value = 0, Cpu = default, ISA = 1):
 # -mgas -mgpopt -quiet -dumpbase -O2 -version -o

gcc2_compiled.:
	.text
	.align	2
	.globl	main

	.comm	y,8

	.comm	z,8

	.text

	.loc	1 6
	.ent	main
main:
	.frame	$sp,0,$31		# vars= 0, regs= 0/0, args = 0, extra= 0
	.mask	0x00000000,0
	.fmask	0x00000000,0
	.set	noreorder
	lw	$2,y
 #APP
	mtc2 $2,$3
 #NO_APP
	.set	reorder
	.set	noreorder
	lw	$3,z
	nop
	.set	reorder
	addu	$2,$2,$3
	sw	$2,y
	j	$31
	.end	main
intrepid% mas -o asm2.o asm2.s
intrepid% mdis asm2.o

asm2.o:     file format tekmips

Disassembly of section .text:
00000000  lw $v0,0($gp)
00000004  mtc2 $v0,$f3
00000008  lw $v1,0($gp)
0000000c  nop 
00000010  addu $v0,$v0,$v1
00000014  sw $v0,0($gp)
00000018  jr $ra
0000001c  nop 

Newsgroups: gnu.gcc.bug
From: dtri@jerome.az.stratus.com (Dave Trinidad)
Subject: Re: SVR4 & gcc-2.3.1 & libg++-2.2
Keywords: gcc++,bug-report
Reply-To: dtri@jerome.az.stratus.com (Dave Trinidad)
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 6 Nov 1992 15:30:46 GMT

In article <9211040824.AA22258@sth.frontec.se> ivpr@sth.FRontec.SE (Ivan  
Prochazka[+46-8-6237391]) writes:
> We haven't been able to build libg-2.2 with  gcc-2.3.1 under SYSV4.
> It fails at the first compilation in the source directory. 
> 
> I guess its the -g flag on SVR4 can not be handled yet.
> 
> Please confirm, it doesn`t yet handle this option so we can stop 
> trying :-).
> 
> 
> 		Greetings Ivan P.
> 
> ------------------------------------------------------------
> Frontec Datakom,  PO Box 204,  S-191 23 Sollentuna,   Sweden
> Ph: +46 8 6237391    Fax: +46 8  965510    Memo:extr.xkkivan
> 
> 
> gcc -g -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c  
AllocRing.cc
> (EOF):undefined name: .L_T51: Not a typewriter
> (EOF):undefined name: .L_B5_e
> (EOF):undefined name: .L_B5
> gmake[2]: *** [AllocRing.o] Error 1
> gmake[1]: *** [in-src] Error 1
> gmake: *** [all-libg++] Error 1

First what is the platform you are compiling on ?? A -v option added to  
complation process  will display the version and the paths of the dependcies.

RMS: I am getting this error on my "unoffical i860BE port" and on i386 ports.
I will look into getting a a better bug report constructed.

---
**********************************
David R. Trinidad #include <disclaimer.h>
Stratus Computer Systems (602) 852-3135
4455 East Camelback RD. #115A UNIX is a way of life ...
Phoenix AZ. 85018
Internet:
david_trinidad@az.stratus.com (PHX Telecom CAC)
.the UNIX user said:
     rm a *
And all was without form and void .....		
*************************************		

Newsgroups: gnu.gcc.bug
From: wierda@ltb.bso.NL (Gerben Wierda)
Subject: install problem on Ultrix 4.2?
Organization: BSO/LT, Baarn, The Netherlands
Distribution: gnu
Date: Fri, 6 Nov 1992 14:21:14 GMT

While running fixincludes I get the following errors:

Fixing ./scs/scamachmac.h
Can't copy ./scs/scamachmac.h
chmod: can't access
/net/local/cpu/decstation/lib/gcc-lib/decstation-ultrix/2.3.1/include/root/usr/sys/io/./scs/scamachmac.h:
No such file or directory
sh:
/net/local/cpu/decstation/lib/gcc-lib/decstation-ultrix/2.3.1/include/root/usr/sys/io/./scs/scamachmac.h.sed:
cannot create
mv: cannot access
/net/local/cpu/decstation/lib/gcc-lib/decstation-ultrix/2.3.1/include/root/usr/sys/io/./scs/scamachmac.h.sed

Some stupid Ultrix shell error or what?

(SunOS 4.1.1. ran OK)

Thanks for hints,

-- 
wierda@ltb.bso.nl (Gerben Wierda)     ||    #include <std/disclaimer.h>. Support
NeXTmail: gerben@rna.indiv.nluug.nl   ||    the League for Programming Freedom!
    "If you don't know where you are going, any road will take you there."
    (From the Talmud(?), rephrased in) Lewis Carroll, "Alice in Wonderland".

Newsgroups: gnu.gcc.bug
From: scott@thyme.jpl.nasa.gov (Keith Scott)
Subject: 2.3.1 stuck in endless loop on _muldi3 on Sun 386i
Organization: Jet Propulsion Lab, Pasadena, CA
Distribution: gnu
Date: Fri, 6 Nov 1992 01:39:05 GMT

Setup: Sun 386i. SunOS 4.0.2. gcc-2.3.1.

here's what I did:

'configure i386-sun-sunos4.0'
'make LANGUAGES=c'

[...]
rm -f tmplibgcc2.a
set -e; \
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2  _lshrdi3 _lshldi3 _ashldi3 _ashrdi3   _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf  _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi  __gcc_bcmp _varargs _eprintf _builtin_new _caps_New _builtin_del  _bb _shtab _clear_cache _trampoline __main _exit _ctors; \
do \
  echo ${name}; \
  ./xgcc -B./ -O2  -DIN_GCC   -g  -g1 -I. -I. -I./config -c -DL${name} \
      ./libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  ar rc tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3

Compiles forever...

-- 

Keith Scott
scott@thyme.jpl.nasa.gov


Newsgroups: gnu.gcc.bug
From: jaf@inference.COM (Jose A. Fernandez)
Subject: Documentation bug report
Organization: Inference Corporation
Distribution: gnu
Date: Fri, 6 Nov 1992 01:32:00 GMT

Environment:

    Software: gcc-2.3.1 (FTP'd from PREP.AI.MIT.EDU:/pub/gnu)
    Hardware: SPARCserver 4/490
    O.S.:     SunOS 4.1_PSR_A

Brief description:

    Node problem in install.texi.

Recipe:

    [1]% cd /usr/local/src/gcc-2.3.1
    [2]% configure sparc-sunos4
    ...[omitted]...
    [3]% make realclean
    ...[omitted]...
    [4]% configure sparc-sunos4
    ...[omitted]...
    [5]% make doc
    makeinfo `echo ./cpp.texi | sed 's,^\./,,'`
    Making info file `cpp.info' from `cpp.texi'.
    makeinfo `echo ./gcc.texi | sed 's,^\./,,'`
    Making info file `gcc.info' from `gcc.texi'.
    install.texi:1288: Node `MIPS Install''s Next field not pointed back to.
    install.texi:773: This node (`Cross-Compiler') is the one with the bad `Prev'.
    *** Error code 2
    make: Fatal error: Command failed for target `gcc.info'

Newsgroups: gnu.gcc.bug
From: terryh@unixhub.slac.stanford.edu (Terry Hung)
Subject: compiling GCC-2.3.1 on NeXT
Reply-To: terryh@unixhub.slac.stanford.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 9 Nov 1992 23:54:02 GMT

   We had problem making GCC-2.3.1 on NeXT. During the second stage:

   make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O"	

   I got:

stage1/xgcc -Bstage1/ -c  -DIN_GCC   -g -O     -I. -I. -I./config -DGCC_INCLUD_
DIR=\"/usr/local/lib/gcc-lib/next/`sed -e 's/.*\"\([^ \"]*\)[\"].*/\1/' < ./ver
sion.c`/include\"-DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" -DCROSS
_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/next/`sed -e 's/.*\"\([^ \"]*\)[\"].*/\1/
' < ./version.c`/sys-include\"-DLOCAL_INCLUDE_DIR=\"/usr/local/include\" -DSTD_
PROTO_DIR=\"/usr/local/lib/gcc-lib/next/`sed -e 's/.*\"\([^ \"]*\)[\"].*/\1/' <
 ./version.c`\" -DUNPROTOIZE ./protoize.c
In file included from ./protoize.c:71:
./gvarargs.h:143: conflicting types for `va_list'
/usr/include/stdarg.h:7: previous declaration of `va_list'
make: *** [stamp-proto] Error 1

  Thanks!


-- 
Terry Hung - Stanford Linear Accelerator Center
phone: 415-926-3618
e-mail: terryh@unixhub.slac.stanford.edu 

Newsgroups: gnu.gcc.bug
From: root@mga.COM (Operator)
Subject: gcc-2.3.1 breaks oleo-1.0
Keywords: gcc,sparc,oleo
Reply-To: <sacco@mga.com>
Organization: Mitchell & Gauthier Associates, Inc, Concord, MA
Distribution: gnu
Date: Thu, 5 Nov 1992 17:22:01 GMT

Tried to build oleo-1.0 using gcc-2.3.1 on a SUN IPX running OS-4.1.3.
After editing one include file to fix a bad prototype:

    *** io_utils.h  Thu Nov  5 10:37:58 1992
    --- io_utils.h.dist     Thu Nov  5 10:37:41 1992
    ***************
    *** 24,30 ****
      #ifdef __STDC__
      extern void clear_spreadsheet ();
      extern char *print_cell (CELL *);
    ! extern char *cell_value_string (CELLREF r, CELLREF c);
      extern char *col_to_str (CELLREF);
      extern char *flt_to_str (double);
      char *backslash_a_string (char *, int);
    --- 24,30 ----
      #ifdef __STDC__
      extern void clear_spreadsheet ();
      extern char *print_cell (CELL *);
    ! extern char *cell_value_string (int r, int c);
      extern char *col_to_str (CELLREF);
      extern char *flt_to_str (double);
      char *backslash_a_string (char *, int);


I ran into an alignment error:

			    .
			    .
			    .

gcc -O -c -g  -DSTDC_HEADERS=1 -DHAVE_X11_X_H=1 -DHAVE_UALARM=1 -DHAVE_SETITIMER
=1 -DHAVE_RENAME=1 -DHAVE_VPRINTF=1  io_utils.c
as: "/usr/tmp/cca23933.s", line 111: error: location counter not on word boundar
y
gnumake: *** [io_utils.o] Error 1


Note that this code compiles and runs under SUN's C-compiler.

-Joseph


-- 
Dr. Joseph E. Sacco            | UUCP:  ...!uunet!pws.ma30.bull.com!eileen!sacco
Mitchell & Gauthier Associates | Internet: sacco@mga.com
200 Baker Avenue               | Fax:      (508)-369-0013
Concord, MA 01742-2100         | Voice:    (508)-369-5115

Newsgroups: gnu.gcc.bug
From: karl@claude.cs.umb.edu (Karl Berry)
Subject: gcc 2.3.1 -- filename in errors wrong?
Reply-To: karl@cs.umb.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 11 Nov 1992 05:58:08 GMT

It seems the preprocessor in GCC 2.3.1 sometimes gets confused as to
what file to report errors in.  Consider the following five-line file foo.c:

extern int a;
extern int b;
#line 1 "./foo.y"
foo
#include "foo.h"

And the one-line file foo.h:

extern int x;

Running `gcc foo.c' reports the error at the erroneous `foo' as follows:

In file included from foo.c:2:
./foo.h:1: syntax error before `extern'

That should be `In file included from foo.y:2:'.  Line two of foo.c is
not in error.

This was on a 486 running Interactive Unix 2.2.1 (configured as
--with-gnu-as i386-isc), and also on an IBM RT running AOS/4.3BSD
(configured as romp-aos), but I doubt the bug is system-dependent.

On the 486, the complete -v output is the following:

Reading specs from /usr/local/gnu/lib/gcc-lib/i386-isc/2.3.1/specs
gcc version 2.3.1
 /usr/local/gnu/lib/gcc-lib/i386-isc/2.3.1/cpp -lang-c -v -undef -D__GNUC__=2 -Dunix -Di386 -D__unix__ -D__i386__ -D__unix -D__i386 foo.c /tmp/cca21680.i
GNU CPP version 2.3.1 (80386, BSD syntax)
 /usr/local/gnu/lib/gcc-lib/i386-isc/2.3.1/cc1 /tmp/cca21680.i -quiet -dumpbase foo.c -version -o /tmp/cca21680.s
GNU C version 2.3.1 (80386, BSD syntax) compiled by GNU C version 2.3.1.
In file included from foo.c:2:
./foo.h:1: syntax error before `extern'

Newsgroups: gnu.gcc.bug
From: cottons@monolith.mit.edu (Cotton Seed)
Subject: Enums fail in labeled element array initalization extension
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sat, 7 Nov 1992 11:14:21 GMT

The following bug exists in both gcc v2.3.1, as well as in snapshot 921106, on  
a 68040 NeXT running NeXTSTEP v3.0.  Both versions of gcc [v2.3.1 and ss921106]  
were built with gcc v2.3.1 with optimization level 2, but in no other way  
deviated from the standard installation process:

monolith[NeXT]% cat test.c
enum { NUM = 5 };

int bad_array[] = { [NUM] 9 };
int good_array[] = { [5] 9 };
int another_good_array[] = { [4 + 1] 9 };

monolith[NeXT]% gcc -c test.c
test.c:3: non-constant array index in initializer

[NOTE: this bug had been previously reported by mjhostet@athena.mit.edu in 

[message <9211022214.AA05706@slayer.MIT.EDU>.

the following diff [made from the ss921106 source.  this code has not changed  
since 2.3.1 release, so the diff would be the same minus date modification  
times].

monolith[NeXT]# diff -c c-typeck.c c-typeck.c.orig 

*** c-typeck.c  Sat Nov  7 15:56:55 1992
--- c-typeck.c.orig     Sat Nov  7 15:56:36 1992
***************
*** 4970,4976 ****
              int win = 0;
              tree index = TREE_PURPOSE (tail);
  

!             if (index && (TREE_CODE (index) == NON_LVALUE_EXPR || TREE_CODE  
(index) == NOP_EXPR))
                index = TREE_OPERAND (index, 0);
  

              /* Begin a range.  */
--- 4970,4976 ----
              int win = 0;
              tree index = TREE_PURPOSE (tail);
  

!             if (index && TREE_CODE (index) == NON_LVALUE_EXPR)
                index = TREE_OPERAND (index, 0);
  

              /* Begin a range.  */

in the case of ENUMS, the tree code is NON_EXPR, so this code merely exposes  
the constant residing in the operand portion of the index tree node.

NOTE: this does not deal with problems in the range array initialization,  
including its failure to handle enums in the ranges.

Newsgroups: gnu.gcc.bug
From: marvinw@intrepid18.wv.tek.COM
Subject: another gcc-2.3.1 -msoft-float -O2 bug
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 11 Nov 1992 18:56:54 GMT

There is a small C program included below which produces the problem.  The
compiler is aborting.

		Marvin Wyckoff
		Tektronix, Inc.
		503-685-2985
		marvinw@orca.wv.tek.com

---------------------------------------------------------------------------
Script started on Wed Nov 11 10:52:47 1992

[ent] cat config.status
#!/bin/sh
# GCC was configured as follows:
../configure --host=mips --target=mips-mips-bsd
echo host=mips-mips-none target=mips-mips-bsd build=mips-mips-none
[ent] uname -a
enterprise enterprise 5.0 RISCos mips
[ent] cat bug4.c
static void CalcEdgeValue (fwidth)
unsigned short *fwidth;
{
   float scale;
   int  temp3;
    if (temp3 < 0)
    {
	if (!scale)
		scale = 1.0;
	*fwidth += (((1.0 / scale) * abs(temp3)) + 0.5);
    }
}
[ent] gcc -msoft-float -O2 -c -v bug4.c
gcc version 2.3.1
 /big1/people/marvinw/nwd/tools/mips/lib/gcc-lib/mips-mips-bsd/2.3.1/cpp -lang-c -v -undef -D__GNUC__=2 -Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43 -D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43 -D__mips__ -D__unix__ -D__host_mips__ -D__MIPSEB__ -D__R3000__ -D__SYSTYPE_BSD43__ -D___mips__ -D___unix__ -D___host_mips__ -D___MIPSEB__ -D___R3000__ -D___SYSTYPE_BSD43__ -D__mips -D__unix -D__host_mips -D__MIPSEB -D__R3000 -D__SYSTYPE_BSD43 -D___mips -D___unix -D___host_mips -D___



MIPSEB -D___R3000 -D___SYSTYPE_BSD43 -D__OPTIMIZE__ -D__LANGUAGE_C -D_LANGUAGE_C -DLANGUAGE_C bug4.c /usr/tmp/cc019120.i
GNU CPP version 2.3.1 [AL 1.1, MM 28] RISC-OS BSD Mips
 /big1/people/marvinw/nwd/tools/mips/lib/gcc-lib/mips-mips-bsd/2.3.1/cc1 /usr/tmp/cc019120.i -mgpopt -quiet -dumpbase bug4.c -msoft-float -O2 -version -o /usr/tmp/cc019120.s
GNU C version 2.3.1 [AL 1.1, MM 28] RISC-OS BSD Mips compiled by CC.
/big1/people/marvinw/nwd/tools/mips/bin/mgcc: Internal compiler error: program cc1 got fatal signal 4

Newsgroups: gnu.gcc.bug