Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!lll-winken!gauss.llnl.gov!casey From: casey@gauss.llnl.gov (Casey Leedom) Newsgroups: gnu.gcc Subject: Function parameter type checking and coercing Message-ID: <40149@lll-winken.LLNL.GOV> Date: 1 Dec 89 19:08:39 GMT Sender: usenet@lll-winken.LLNL.GOV Reply-To: casey@gauss.llnl.gov (Casey Leedom) Distribution: gnu Organization: Lawrence Livermore National Laboratory Lines: 28 I don't get a chance to program much these days which is why I haven't noticed this before. I was pointing out to someone that one of the advantages of ANSI C and hence GNU GCC was function parameter type checking. In the process of trying to demonstrate it I was unable to ever get GNU GCC to issue a parameter type mismatch. I also couldn't get GNU GCC to automatically coerce passed parameters to functions' parameter types as I thought the ANSI C specification specified and ANSI C compiler would do. (I may be totally off base on that last issue.) If GNU GCC won't issue type mismatch messages for function parameter type mismatches, what's the point of function proto-typing? I used the following with every combination of -ansi, -pedantic, -Wfoo that I could think of to try to get GNU GCC to generate some kind of warning message: main() { sub("test"); } sub(float a) { } Am I just doing something wrong/stupid? Or is this a feature that isn't supported yet? Will it ever be? Casey Brought to you by Super Global Mega Corp .com