Re: [PATCH] Fix type checking of variadic functions

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

 



On Thu, Nov 3, 2016 at 1:13 AM, Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:
> When doing a type comparison between functions, in the varidicity part,
> the base type of these functions (= their return type) is
> wrongly used intead of their own type.
>
> Fix this and add some tests showing this and others cases are
> now OK

This looks correct to me. The function return type can't be a function.
So the base type of the functions will never have the variadic bit set.

Speaking of the test case, there are two case can be added:

void arg_incomplete();
void arg_incomplete(int a) {} /* check-should-pass */

void arg_incomplete_vararg();
void arg_incomplete_vararg(int a, ...) {} /* check-should-fail */

Sparse handle the first one incorrectly. But that is a separate issue,
we can address it in a different patch.

Will apply.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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