Subject: Re: lint doesn't define __STDC__?
To: None <tech-toolchain@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-toolchain
Date: 11/07/2007 22:31:19
In article <87sl3hdhz7.fsf@enigma.tcs.hut.fi>,
Johan Wallén <johan.wallen+lists@helsinki.fi> wrote:
>David Holland <dholland+netbsd@eecs.harvard.edu> writes:
>
>> What C dialect is lint supposed to be processing?
>
>My reading of lint(1) is that the default is ANSI C89 / ISO C90 (without
>options like -t or -S).  So __STDC__ should be defined, if I understand
>correctly. 
>
>[...]
>
>I have for a long time had a confusion about lint, and this might be a
>good occation (although it is off-topic) to ask: should not lint be an
>obsolete tool?  A C compiler should have more information available, so
>it should be able to do all the checks lint does and more?  In an ideal
>world, at least.

It should for pass 1 [compiling], not for pass 2 [linking]. In reality
lint is pickier than the compiler. Just try it.

christos