🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Dave Hanson Sat, 08 Oct 1988 13:26
initializer bug
#1882
Author: Dave Hanson
Date: Sat, 08 Oct 1988 13:26
17 lines
1083 bytes
my reading of the 5/88 standard and K&R2 says
that the following initializations are legal
(ie, the {} are optional) but gcc complains.

[703] cat bug4.c
union { int x; char *y; } a = 5;
struct { int x; char *y; } b = 6;

[704] gcc -S -v bug4.c
gcc version 1.28
 /usr/local/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dvax -Dunix bug4.c /tmp/cc028798.cpp
GNU CPP version 1.28
 /usr/local/lib/gcc-cc1 /tmp/cc028798.cpp -quiet -dumpbase bug4.c -version -o bug4.s
GNU C version 1.28 (vax) compiled by GNU C version 1.28.
bug4.c:1: type mismatch in initialization
bug4.c:2: invalid initializer
[705] 
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