[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <78f6d6cc-2be5-c69b-bd17-7da135448438@rasmusvillemoes.dk>
Date: Tue, 28 Sep 2021 11:56:12 +0200
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Hans de Goede <hdegoede@...hat.com>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
linux-sparse@...r.kernel.org
Cc: Arnd Bergmann <arnd@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Al Viro <viro@...iv.linux.org.uk>,
Arnd Bergmann <arnd@...db.de>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] vboxsf: fix old signature detection
On 27/09/2021 15.02, Dan Carpenter wrote:
> GCC handles it the same way as Clang. '\377' is -1 but in Sparse it's
> 255. I've added the Sparse mailing list to the CC.
FTR, while examples are not normative, this:
EXAMPLE 2 Consider implementations that use two's complement
representation for integers and eight bits for objects that have type
char. In an implementation in which type char has the same range of
values as signed char, the integer character constant '\xFF' has the
value -1; if type char has the same range of values as unsigned char,
the character constant '\xFF' has the value +255.
doesn't leave any ambiguity or (implementation|un)-definednes, and
sparse interpreting '\377' as 255 independent of its
target->unsigned_char is a plain bug in sparse.
Rasmus
Powered by blists - more mailing lists