Xref: utzoo comp.sys.m6809:913 comp.os.os9:179 comp.lang.c:13277 Path: utzoo!attcan!uunet!husc6!bloom-beacon!apple!bionet!agate!helios.ee.lbl.gov!lll-tis!ames!pacbell!att!ihlpl!knudsen From: knudsen@ihlpl.ATT.COM (Knudsen) Newsgroups: comp.sys.m6809,comp.os.os9,comp.lang.c Subject: C Compiler Bug (yes, another one) Keywords: Microware, 6809, OS9 Message-ID: <7201@ihlpl.ATT.COM> Date: 13 Oct 88 19:27:38 GMT Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 46 YACCB == Yet Another Microware OS9/6809 'C' Compiler Bug (just what we needed). This one is strange, and probably occurs only when the compiler is overloaded by a big source file. After a *very* long main() function definition, and a couple of static arrays, I had several more very short function bodies. The second one looked like int barmice(x) int x; { int i; ....couple lines of code .... } and the compiler tagged the "int x" as "redeclaration of x." Or mayube "redefinition." Now that's quite a trick, since argument variable declarations override any other usage of that same name. [I'd already called barmice(mx), where mx was also int; I hear some fancy compilers will pre-infer argument types from calls, something I've only seen LINT do.] Changing x's name to something unique didn't help. Swapping this function body with the following one got rid of the error. I don't consider that much of a "fix." My belief is that some table in the compiler got full. Since the 6809 compiler phases don't bother to check for I/O errors (like disk full), I suspect they didn't catch this table-full error and either messed up a table entry or expanded one table to tromp on some other data, so all bets were off. Guess we'll just have to keep our function bodies less than a few pages each, even for main(). (Flames about programming style to /NIL). I like the Microware C compiler, but I sure wish they'd do better error checking, at least in Level II where you can afford the extra memory. -- Mike Knudsen Bell Labs(AT&T) att!ihlpl!knudsen "Lawyers are like handguns and nuclear bombs. Nobody likes them, but the other guy's got one, so I better get one too."