Source-Changes-D archive

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

Re: lint warnings



On Jun 28,  9:30pm, roland.illig%gmx.de@localhost (Roland Illig) wrote:
-- Subject: Re: lint warnings

| I agree on this use case. On the same scheme, I'd have a few more use
| cases, and eventually this might lead to a query language for inspecting
| C code. I'm thinking of queries like:
| 
| * implicit conversions from floating to integer types
| * implicit conversions that change the signedness
| * usual arithmetic conversions that change one of the operands
| * casts from floating to integer types
| * binary + with operand types 'integer' and 'pointer'
| * no-op pointer casts
| * pointer casts between types that are not strictly compatible
| * pointer casts after function calls to 'malloc'
| * conversion from array to pointer
| 
| Short of having this runtime query language, these questions might be
| implemented as lint warnings that are disabled by default and could be
| enabled by their message ID or a descriptive name. All current lint
| warnings are enabled by default, it's just that some branches are
| guarded by command line flags, especially in cases where several places
| in lint's code generate the same warning.

Yes, that would be great.

| And maybe there are already tools out there that support this kind of
| queries, in a simpler language than C.

I am not familiar with any; closest I can think is something like coverity.

christos


Home | Main Index | Thread Index | Old Index