tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: proposal: remove traditional C support from lint



On Wed, Mar 17, 2021 at 00:55:03 +0100, Roland Illig wrote:

> when I run lint with the -t flag for traditional C (which means before
> C90), I always get these warnings:
> 
> $ >empty.c
> $ lint -t empty.c
> (1): warning: 'long double' is illegal in traditional C [266]
> (1): warning: function prototypes are illegal in traditional C [270]
> (2): warning: 'long double' is illegal in traditional C [266]
> (2): warning: function prototypes are illegal in traditional C [270]
> (3): warning: 'long double' is illegal in traditional C [266]
> (3): warning: 'long double' is illegal in traditional C [266]
> (3): warning: function prototypes are illegal in traditional C [270]
> 
> These warnings are generated by the following 3 declarations that have
> been built-in into lint since main1.c 1.22 from 2014:
> 
>     int __builtin_isinf(long double);
>     int __builtin_isnan(long double);
>     int __builtin_copysign(long double, long double);
> 
> I don't know of anyone having complained about these obviously bogus
> warnings, therefore I suspect that nobody is using the -t flag anymore,
> which makes sense to me, given that traditional C has been superseded by
> C90 over 30 years ago.
> 
> Any objections to removing the -t flag and everything that belongs to it?

May be it would be easier to not make the declarations that are not
compatible with the traditional mode when running in traditional mode?

Frankly, with modern compilers I don't see much (any, more like) point
of using lint on modern code.  Playing catch up with gcc extensions
doesn't add much value compared to gcc/clang.  If there is any utility
left in lint it's exactly running it on traditional code bases that
cannot be converted to modern C, so ripping K&R support out would be
kinda ... counterituitive.

-uwe


Home | Main Index | Thread Index | Old Index