Article View: comp.sys.atari.st
Article #29604Re: Alcyon C Bug N++
From: Steven Pemberton
Date: Mon, 07 Dec 1987 14:59
Date: Mon, 07 Dec 1987 14:59
38 lines
1869 bytes
1869 bytes
For people interested, here are a couple of bugs in the Alcyon
compiler that we've been hitting our heads against for the last few
weeks:
1) The compiler doesn't seem able to cope with nested
initialisations. For instance, a struct with an array in
the middle:
static struct foo table[] = {
{ ...... {.....} ......},
...
}
The compiler complains about mismatched braces.
Cure: 'unwrap' the struct declaration, so it's all at the
same level.
2) In a construct like
bar *p = (expression1, expression2);
the result of expression2 gets coerced to int, and then
back to bar *, meaning basically that you get bombs on the
screen when you try to use p, due to a wrong address.
Cure: use
bar *p = (expression1, (bar *) expression2);
3) We believe that 'complicated' initialisations to auto
variables in functions (for instance where the
initialisation involves a call to another function) often
come out wrong. However, by this point, we despaired, and
stopped using the compiler, so we never followed up on it.
I might point out that we're trying to compile a BIG program: 30,000
lines of C, so just trying to trace bug 2 took us a LOT of time.
By the way, just for interest: to compile the lot from scratch, using
a ram disk for temporaries would take 4 hours. When we reinitialised
the disk partition, and copied the files back, a recompile only took
1.5 hours!
Steven Pemberton, CWI, Amsterdam; steven@cwi.nl
Technical Details
Message-ID:
<140@piring.cwi.nl>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!stevenReferences:
<8712051307.AA12109@ucbvax.Berkeley.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!steven From: steven@cwi.nl (Steven Pemberton) Newsgroups: comp.sys.atari.st Subject: Re: Alcyon C Bug N++ Message-ID: <140@piring.cwi.nl> Date: 7 Dec 87 14:59:48 GMT References: <8712051307.AA12109@ucbvax.Berkeley.EDU> Reply-To: steven@cwi.nl (or try mcvax!steven.uucp) Organization: CWI, Amsterdam Lines: 38