Re: [PATCH] casts should drop qualifiers

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

 



On Tue, Nov 17, 2020 at 1:29 PM Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:
>
> Casts should drop qualifiers but Sparse doesn't do this yet.
>
> The fix seems pretty simple: after having evaluated the type of
> the cast, if this type is a SYM_NODE and contains qualifiers,
> make a copy of the type with the qualifiers removed and use
> this copy as the type.

Did you look at the lvalue conversion issue too?

IOW, ((void)0,(x)) should end up also with qualifiers dropped on the
end result, because the comma expression will have turned x from an
lvalue to an rvalue.

Would doing the same unqualify_type() in degenerate() be sufficient?

No, the kernel doesn't care, even with that suggested patch, so maybe
that all doesn't matter.

           Linus



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux