Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mstan!amull From: amull@Morgan.COM (Andrew P. Mullhaupt) Newsgroups: comp.lang.c Subject: Re: log10(8) Summary: Not So. Try it on Sun OS Message-ID: <762@hnm.Morgan.COM> Date: 2 Mar 90 15:17:11 GMT References: <3244@servax0.essex.ac.uk> <16022@haddock.ima.isc.com> <16048@haddock.ima.isc.com> Organization: Morgan Stanley & Co. NY, NY Lines: 30 In article <16048@haddock.ima.isc.com>, karl@haddock.ima.isc.com (Karl Heuer) writes: > In article <756@s5.Morgan.COM> amull@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@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