ANSI C => traditional C conversion tool?

Karl Heuer karl at haddock.ima.isc.com
Mon Jun 11 06:10:36 AEST 1990


In article <1990Jun9.110055.10004 at druid.uucp> darcy at druid.UUCP (D'Arcy J.M. Cain) writes:
>I have never used one of these [ANSI C to Classic C] converters and was
>wondering if they will generate a cast for arguments for which a prototype is
>in scope.  It seems to me that errors can creep in if you don't do this.  Not
>only do ANSI compilers check your parameters to prototyped functions but they
>also perform an automatic cast.

More correctly, they perform an automatic *conversion* (as if by assignment,
not by cast).  For example, a mismatch of `int *' vs `char *' must generate a
diagnostic if there's no explicit cast.

Rather than having the tool add casts to my code, I'd rather have a compiler
option to warn about nontrivial conversions of arguments (or use lint).

Karl W. Z. Heuer (karl at ima.ima.isc.com or harvard!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list