Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!ai-lab!ai.mit.edu!tmb From: tmb@ai.mit.edu (Thomas M. Breuel) Newsgroups: comp.lang.c Subject: new style declarations OK for old style definitions? Message-ID: <14590@life.ai.mit.edu> Date: 3 Apr 91 11:17:24 GMT Sender: news@ai.mit.edu Reply-To: tmb@ai.mit.edu Organization: MIT Artificial Intelligence Lab Lines: 19 K&R/2 is a little vague on the following question: under what circumstances is it legal to declare using new-style syntax a separately compiled function that was compiled with an old-style definition. Is it sufficient to use only promoted arguments in the new-style declaration? Conceivably, the whole calling sequence for old style and new style definitions could differ. Is it legal for the compiler to choose completely incompatible calling sequences for old-style and new-style declarations? It would certainly be desirable, since new-style declarations seem to allow for significant optimizations that aren't possible with old-style declarations. This is a frequent problem if you have old library binaries and sources but want the extra type checking from an ANSI compiler. Thanks, Thomas.