🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1768

bug in SUN-3 gcc-1.28 when *not* optimising.

#1768
From: Paul Hudson
Date: Wed, 05 Oct 1988 15:45
37 lines
1621 bytes
The following program prints mostly nulls when compiled with "gcc -o
crap crap.c". It looks like it's printing correctly only the character
returned by the occasional call to _filbuf in getc.

Optimise the program and it works.

This bug I believe has other manifestations in other programs of
mine. Unfortunately, they're much too big to post.

Ember? it's not really a flame; is gcc going to get more stable? I
know it costs me nothing, and it's an excellent compiler (which is why
I'm saying this), but it's difficult to know which version I should be
using for products for distribution. I would like to have programs I
distribute contain as far as possible only the bugs I put there! Is
there a case for a secondary release of each version (1.28b?) which
just bug-fixes rather than improves? 

#include <stdio.h>
main()
{
    FILE *fred = fopen("/etc/termcap", "r");
    while(1)
    {
	int c;
	c = getc(fred);
	putchar(c);
    }
}

Paul Hudson 

Snail mail: Monotype ADG	Email:	...!ukc!acorn!moncam!paul
	    Science Park,		paul@moncam.co.uk
	    Milton Road,	"Sun Microsysytems:
	    Cambridge,		 The Company is Arrogant (TM)"
	    CB4 4FQ
Technical Details
Message-ID: <8810051545.AA29883@marvin.moncam.uucp>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!moncam!paul

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!moncam!paul
From: mcvax!moncam!paul@UUNET.UU.NET (Paul Hudson)
Newsgroups: gnu.gcc.bug
Subject: bug in SUN-3 gcc-1.28 when *not* optimising.
Message-ID: <8810051545.AA29883@marvin.moncam.uucp>
Date: 5 Oct 88 15:45:22 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 36