comparisons yield bool instead of int?

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

 



The C standard says that equality operators yield "int", but sparse
thinks that they yield "bool":

    blp@sigsegv:~/sparse$ cat test.c
    static void f(void)
    {
       sizeof(1 == 2);
    }
    blp@sigsegv:~/sparse$ ./sparse test.c
    test.c:3:4: warning: expression using sizeof bool
    blp@sigsegv:~/sparse$ git rev-parse HEAD
    970d7169d75068146152ba01a66381c800dbeb71

Thanks,

Ben.
--
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