cURL / Mailing Lists / curl-library / Single Mail


Re: Compiling with the Intel compiler

From: Tor Arntsen <>
Date: Wed, 25 Feb 2004 15:59:45 +0100

On Feb 25, 15:18, Daniel Stenberg wrote:
>I'm adjusting the configure detection now to use -wd279 on all icc compilers,
>and -Wall on everything above icc 6.0.
TA>> "-Wall" makes it pretty chatty.
>So I've seen! ;-) I take it we can use multiple -wd options if I we want to
>disable some more warnings?

Yep. You can either use multiple -wd options, or just list them up with a
single -wd option, comma-separated. I.e. these two are equivalent:

-wd279 -wd981

>Some of those are only annoying. Such as the remarks 981, 1418, 1419 and the
>181 in most cases. In fact, all warnings on string (*printf) formats are
>better switched off since they're so often wrong.

I'm not sure if I agree about those printf warnings. Just picking a couple at
random I see for example:

                  fprintf(stream, "%03d", longinfo);

longinfo is 'long' and thus %d isn't right.

    fprintf(stderr, "curl_share_cleanup failed, code errno %d\n", scode);

scode is an enum. This is a bit more questionable than the long/int issue
above, but it looks like iso9x compilers are heading at making enums distinct
types and not just an 'int' alias. (Older compilers' implementation of enum
is really just a joke, it's very nearly the same as simply using a bunch of
#defines and there were no compile-time checks for passing whatever you wanted
to a function expecting an enum.)

Received on 2004-02-25