🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Thomas M. Talpey Sun, 09 Oct 1988 23:36
"const" problem in gcc v1.26 and up
#1757
Author: Thomas M. Talpey
Date: Sun, 09 Oct 1988 23:36
59 lines
1950 bytes
Gcc cc1, versions 1.26-1.29 have all exhibited the following failure to
do "const" definitions. V1.25 did the right thing, but later versions
usually fail to emit the ".text", although they occasionally do it once
per file, allowing exactly one const to come out right.

Machine: Sun 2/50 or 3/50
Files:	tm -> tm-sun2.h
	md -> m68k.md
	config -> config-m68k.h

% cat tst.c
const char a[] = "test";
int b[] = { 1 };
const long c[] = { 2 };
% 
% gcc -B/usr/local/lib/gcc-old/gcc- -v -S tst.c
gcc version 1.29
 /usr/local/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__HAVE_68881__ -Dmc68010 tst.c /tmp/cca17474.cpp
GNU CPP version 1.29
 /usr/local/lib/gcc-old/gcc-cc1 /tmp/cca17474.cpp -quiet -dumpbase tst.c -version -o tst.s
GNU C version 1.25 (68k, MIT syntax) compiled by GNU C version 1.24.
% cat tst.s
#NO_APP
.globl _a
.text				| V1.25 - correct
_a:
        .ascii "test\0"
.globl _b
.data				| ...
        .even
_b:
        .long 1
.globl _c
.text
        .even
_c:
        .long 2
% 
% gcc -B/usr/local/lib/gcc-new/gcc- -v -S tst.c
gcc version 1.29
 /usr/local/lib/gcc-new/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__HAVE_68881__ -Dmc68010 tst.c /tmp/cca17478.cpp
GNU CPP version 1.29
 /usr/local/lib/gcc-new/gcc-cc1 /tmp/cca17478.cpp -quiet -dumpbase tst.c -version -o tst.s
GNU C version 1.29 (68k, MIT syntax) compiled by GNU C version 1.28.
% cat tst.s
#NO_APP
.globl _a
.data				| V1.29 (and 1.26->), incorrect
_a:
        .ascii "test\0"
.globl _b
        .even
_b:				| no .text/.data ...
        .long 1
.globl _c
        .even
_c:
        .long 2
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