ANSI C -> non-ANSI C

Karl Heuer karl at ima.isc.com
Sun Dec 9 06:55:17 AEST 1990


In article <308 at dcsun21.dataco.UUCP> amodeo at dcsun03 (Roy Amodeo,DC) writes:
>In article <2880 at lupine.NCD.COM> rfg at NCD.COM (Ron Guilmette) writes:
>>[I've been planning to add an (optional) GCC warning for non-trivial
>>conversions caused by prototypes.]

I like this solution.  (Note that it may be approximated with current tools by
unprotoizing and then running lint.)

>make it the default [with an option to turn it off].

The important bit is to get the feature implemented and make it optional.
Deciding which setting should be default is a minor issue, and in any case it
can be tuned for your local site.  (I usually run gcc with -Wall -Wcast-qual
-Wwrite-strings, myself.)

>I don't suppose you can say "3d" or "3.0L" for "(double)3" can you?

Since floating-point constants have type "double" by default, it suffices to
use "3.0" (or even "3.", but I consider it good style to always have a digit
on each side of the decimal point).

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



More information about the Comp.lang.c mailing list