🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by "Nelson H.F. Beebe" Fri, 30 Sep 1988 01:14
GCC version 1.27 thinks NUL == End-of-file
#1728
Author: "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.
-------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads