🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #848

struct bug?

#848
From: Kai-Mikael J{{-Aro
Date: Wed, 06 Dec 1989 17:38
28 lines
1137 bytes
I had some strange problems with a program I wrote.  Finally I
isolated the problem to this:
The following program compiles OK:

struct {
	char signed;
	int x;
} foo;

main()
{
	/* foo.signed = 'y';*/
	foo.x = 4711;
}

Now, if I uncomment the first statement in the main program I get the
following error message:

x.c: In function main:
x.c:8: parse error before `signed'

Turns out that "signed" apparently is a reserved word, but gcc does
not notice that I don't declare any identifier in the struct.  Is this
correct behaviour?  I ran GCC 1.36 (pyr).
-- 
Kai-Mikael J{{-Aro	d85-kai@nada.kth.se
"You know how Einstein had bad grades as a kid?  Well, mine are even WORSE!"
	- Calvin
Technical Details
Message-ID: <2483@draken.nada.kth.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!genbank!snorkelwacker!bloom-beacon!eru!luth!sunic!draken!d85-kai

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!genbank!snorkelwacker!bloom-beacon!eru!luth!sunic!draken!d85-kai
From: d85-kai@nada.kth.se (Kai-Mikael J{{-Aro)
Newsgroups: gnu.gcc.bug
Subject: struct bug?
Message-ID: <2483@draken.nada.kth.se>
Date: 6 Dec 89 17:38:36 GMT
Reply-To: d85-kai@nada.kth.se (Kai-Mikael J{{-Aro)
Organization: Royal Institute of Technology, Stockholm, Sweden
Lines: 27