🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1728

GCC version 1.27 thinks NUL == End-of-file

#1728
From: "Nelson H.F. Beebe"
Date: Fri, 30 Sep 1988 01:14
26 lines
1090 bytes
A null in a file (indicated by ^@ below) is interpreted by gcc 1.27 as
an end-of-file on both Unix and VAX VMS (we found a null in types.h in
the recent VMS gcc distribution):
 
404 plot79>cat foo.c
#include <stdio.h>

main()
{
        printf("hello,world\n");
}

Sun OS 4.0 cc flags it as an error:

405 plot79>cc -o foo foo.c
"foo.c", line 2: illegal character: 000 (octal)

gcc 1.27 just quits after the NUL; using -E or -S verifies that.

406 plot79>gcc -o foo foo.c
ld: Undefined symbol 
   _main 

My personal preference would be for NUL to be simply ignored; otherwise,
an error should be generated.  End-of-file should not be, I think.
-------
Technical Details
Message-ID: <12434552024.29.BEEBE@SCIENCE.UTAH.EDU>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!osu-cis!tut.cis.ohio-state.edu!SCIENCE.UTAH.EDU!Beebe

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!osu-cis!tut.cis.ohio-state.edu!SCIENCE.UTAH.EDU!Beebe
From: Beebe@SCIENCE.UTAH.EDU ("Nelson H.F. Beebe")
Newsgroups: gnu.gcc.bug
Subject: GCC version 1.27 thinks NUL == End-of-file
Message-ID: <12434552024.29.BEEBE@SCIENCE.UTAH.EDU>
Date: 30 Sep 88 01:14:19 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 25