Related articles |
---|
Inter-module type checking for C (was: A lesson for ...) rfg@ncd.com (1992-06-19) |
Re: Inter-module type checking for C (was: A lesson for ...) rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) (1992-06-22) |
Re: Inter-module type checking for C (was: A lesson for ...) rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) (1992-06-22) |
Re: Inter-module type checking for C (was: A lesson for ...) ian@airs.com (1992-06-22) |
Newsgroups: | comp.compilers |
From: | ian@airs.com (Ian Lance Taylor) |
Keywords: | C, lint, GCC |
Organization: | Compilers Central |
References: | <19920609091040SEB1525@MVS.draper.com> 92-06-094 |
Date: | Mon, 22 Jun 1992 14:17:27 GMT |
>[You could still lose if you forget to include the .h file in the .c file
>that declares the function, but in general it's certainly true that if you
>use prototypes your compiler will point out type mismatches. -John]
To avoid exactly this problem, we added a warning to gcc (about
version 1.37 or so) which warned if a globally visible function was
declared without a prototype. This made it into gcc 2.0 as
-Wmissing-prototypes. This reduces the problem to ensuring that the
prototype appears in only one header file.
--
Ian Lance Taylor ian@airs.com uunet!airs!ian
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.