Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!cbnewsd!knudsen From: knudsen@cbnewsd.att.com (michael.j.knudsen) Newsgroups: comp.os.os9 Subject: OSK C Compiler problem with No. of Args Keywords: OSK, C Message-ID: <1991Apr25.174038.7834@cbnewsd.att.com> Date: 25 Apr 91 17:40:38 GMT Organization: AT&T Bell Laboratories Lines: 23 This isn't a bug (maybe), but something I found while porting a large program from OS-9/6809 to OS-K. If one of your functions is defined as taking N arguments, then your calls to that function had better have exactly N arguments, no less! (Maybe more is OK; not tried). I mean omitting args off the end, not out of the middle -- no compiler could figure that out! 6809 C, which pushes all args in reverse order on the stack, is very tolerant about missing arguments if the other args' values tell the function code not to reference the missing ones. But OSK C does strange things sometimes if not all args are present. I know it puts the first two args in regs d0 and d1, then pushes the rest on stack, in [I hope] reverse order. Anyway, just another sloppy programming practice that you can't get away with any more. -- "What America needs is A Thousand Points When Lit..." knudsen@iceland.att.com