log10(8)
Andrew P. Mullhaupt
amull at Morgan.COM
Sat Mar 3 02:17:11 AEST 1990
In article <16048 at haddock.ima.isc.com>, karl at haddock.ima.isc.com (Karl Heuer) writes:
> In article <756 at s5.Morgan.COM> amull at Morgan.COM (Andrew P. Mullhaupt) writes:
> >lint might not tell him about the tragedy unless he [specifies -lm]
>
> True (as Mark Brader also pointed out). But (a) in that case he'd still get a
> warning `log10 used but not defined', which is a clue, and (b) in order to get
No. This did not happen when I used lint on Sun OS 4.??. Is this lint
broken because it knows about log10 without the -lm flag? The compiler,
(as one would expect) did need the -lm directive.
> this far he has to already know about `cc -lm', and it doesn't take too much
> imagination to guess that lint requires the same magic as cc. (Similarly for
> any -D flags.)
>
> Karl W. Z. Heuer (karl at ima.ima.is.ccom or harvard!ima!karl), The Walking Lint
I would expect that a certain translation of gestalt is required in order
to reconcile what seems obvious to 'The Walking Lint' as opposed to the
guy who originally had the difficulty. In fact, another tool which works
out compiler source dependencies - cscope - doesn't have the same command
line arguments as cc. This fact places different burdens, I would suppose
on different people's imaginations. It is my experience that C is not a
very easy language if you seriously use three or four others across more
than two operating systems, and it's very common to have deep mysteries
arise out of thinking in the wrong context. You may suppose that it adds
little help to be explicit about the -lm flag, but I believe that the
answer should be as complete as possible. Who knows - somebody using
Sun OS might encounter this difficulty. Sun OS is not too rare...
Later,
Andrew Mullhaupt
More information about the Comp.lang.c
mailing list