Article View: comp.sys.amiga.tech
Article #9208Bug in Lattice C 4.01
From: Jeff Kelley
Date: Wed, 29 Jun 1988 06:34
Date: Wed, 29 Jun 1988 06:34
24 lines
1322 bytes
1322 bytes
Taking the 'sizeof' an undefined structure returns a 0 rather than
generating an error.
e.g.
main(){
printf("sizeof(struct Undef)=%d",sizeof(struct Undef));
}
will print 'sizeof(struct Undef)=0'.
This one bit me when I forgot to #include a header file, and my only
use of the structure in the file was through a 'sizeof' reference.
Debugging devices is hard enough without debugging the compiler too. :-(
Tip to Lattice C users: If you've been frustrated by 'omd's inability
to disassemble load files, there is a partial way around it. When you
link all your object files together, use the 'PRELINK' option to 'blink'.
You then get something very similar to a load file, but 'omd' will grok it.
--
Jeff Kelley Graphics Lab, Dept. of Computer Science, University of Waterloo
uunet!watmath!watcgl!jvkelley tel: (519) 578-4514
"Remember, this is not a competition, only an exhibition. Please, no wagering."
- David Letterman
Technical Details
Message-ID:
<5016@watcgl.waterloo.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!watcgl!jvkelleyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!watcgl!jvkelley From: jvkelley@watcgl.waterloo.edu (Jeff Kelley) Newsgroups: comp.sys.amiga.tech Subject: Bug in Lattice C 4.01 Summary: fails to report undefined struct error Message-ID: <5016@watcgl.waterloo.edu> Date: 29 Jun 88 06:34:49 GMT Distribution: comp Organization: U of Waterloo, Ontario Lines: 24