Goodbye for lint(1)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Goodbye for lint(1)

Konstantin Belousov
I believe the time has come to remove lint and its libraries from the
system. I did some manipulations with the mcontext_t/ucontext_t to make
us more POSIX-compatible, and found several things about lint(1) which
cause serious questions about tool usefulness.

My main point is that the lint processing starts with "cc -E -undef"
producing the preprocessed source of the linted file or library. The
-undef switch removes (almost) all predefined symbols, most importantly,
the __<arch>__ and __LP64__ and its variants are dropped.

Due to this, for the whole 10.x lifetime, since the merge of the i386
and amd64 MD includes, lint cannot ever correctly work on amd64. The
same should be true for powerpc, and there headers are more unified and
the effect is less enchanting. Even on i386, since headers other than
_type.h tend to use #ifdef __i386__/#endif and #ifdef __amd64__/#endif,
lint cannot see a lot of system.

Nobody complained for 3 (?) years about the tool which clearly
misfunctioned. I propose to kill it as unused. Modern compilers do much
better job at diagnosing inconsistencies supposedly detected (but really
not) by lint.

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Goodbye for lint(1)

Rui Paulo-6
On Thu, 2016-02-11 at 13:20 +0200, Konstantin Belousov wrote:

> I believe the time has come to remove lint and its libraries from the
> system. I did some manipulations with the mcontext_t/ucontext_t to
> make
> us more POSIX-compatible, and found several things about lint(1)
> which
> cause serious questions about tool usefulness.
>
> My main point is that the lint processing starts with "cc -E -undef"
> producing the preprocessed source of the linted file or library. The
> -undef switch removes (almost) all predefined symbols, most
> importantly,
> the __<arch>__ and __LP64__ and its variants are dropped.
>
> Due to this, for the whole 10.x lifetime, since the merge of the i386
> and amd64 MD includes, lint cannot ever correctly work on amd64. The
> same should be true for powerpc, and there headers are more unified
> and
> the effect is less enchanting. Even on i386, since headers other than
> _type.h tend to use #ifdef __i386__/#endif and #ifdef
> __amd64__/#endif,
> lint cannot see a lot of system.
>
> Nobody complained for 3 (?) years about the tool which clearly
> misfunctioned. I propose to kill it as unused. Modern compilers do
> much
> better job at diagnosing inconsistencies supposedly detected (but
> really
> not) by lint.

Yes, it should've been removed years ago...

--
Rui Paulo

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"