Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!caen!uflorida!kluge!serss0!acmfiu From: acmfiu@serss0.fiu.edu (ACMFIU) Newsgroups: comp.sys.apple2 Subject: Re: orca/c bug Message-ID: <3801@kluge.fiu.edu> Date: 10 Jun 91 22:40:26 GMT References: <3728@kluge.fiu.edu> <16345@smoke.brl.mil> <3768@kluge.fiu.edu> <16363@smoke.brl.mil> Sender: news@kluge.fiu.edu Organization: Florida International University, Miami Lines: 28 In article <16363@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: >In article <3768@kluge.fiu.edu> acmfiu@serss0.fiu.edu (albert chin) writes: >>this was a typo on my part. the program will still not work when you change >>the realloc to 'foo = realloc (foo, 10 + 1);' > >I haven't yet tried your program (after fixing it up), so I don't know >whether or not you have uncovered a bug in ORCA/C. >However, note that you still need to get realloc() properly declared -- >including its argument types -- before invoking it. The int expression >is not compatible with the expected type for the second argument, and >since the 65816 is a "little endian" architecture, this mismatch could >go undetected in many cases. i don't understand what you just said. do you mean that orca/c will have problems promoting '10 + 1' to size_t because it doesn't know about the prototype for realloc()? if this is so, then you're right. but all you need to do is "#include " for orca/c to automatically promote the '10 + 1' to size_t. incidentally, i even tried '(unsigned long)(10 + 1)' as the parameter so if orca had problems this should have fixed it. i don't think it has problems promoting arguments though. in coff i prototype everything and i know i pass values like 'char' that are promoted to 'unsigned long' and they work just fine. next time i'll post the *entire* program so we don't get into this confusion again. i just hope i didn't make the same mistake on AOL when i listed the bug. albert