From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWhOQ-0004uG-P1 for qemu-devel@nongnu.org; Mon, 08 Aug 2016 06:02:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWhOL-0002Jp-GE for qemu-devel@nongnu.org; Mon, 08 Aug 2016 06:02:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWhOL-0002Je-B2 for qemu-devel@nongnu.org; Mon, 08 Aug 2016 06:02:41 -0400 References: <20160807014121.18739-1-bobby.prani@gmail.com> <31b8d7c7-6a5c-910f-b799-25a8e00c8908@redhat.com> <561336e2-41b3-d2a8-600e-e777747cac62@redhat.com> <080c7421-c46d-f98a-5a38-7ad6eaf6bd35@twiddle.net> From: Paolo Bonzini Message-ID: <1ced2a30-ef21-c14a-bd76-780fe2d20f73@redhat.com> Date: Mon, 8 Aug 2016 12:02:36 +0200 MIME-Version: 1.0 In-Reply-To: <080c7421-c46d-f98a-5a38-7ad6eaf6bd35@twiddle.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1] seqlock: Fix warning reg. incompatible cast List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , Pranith Kumar , "Emilio G. Cota" , =?UTF-8?Q?Alex_Benn=c3=a9e?= , Sergey Fedorov , Markus Armbruster , "open list:All patches CC here" On 08/08/2016 12:00, Richard Henderson wrote: > On 08/08/2016 03:25 PM, Paolo Bonzini wrote: >> + >> __builtin_choose_expr( \ >> + __builtin_types_compatible_p(typeof(expr), const char) >> || \ >> + __builtin_types_compatible_p(typeof(expr), >> char), \ >> + >> (char)1, \ > > Better as signed char, since bare char could be either signed or unsigned. It's also better to add a volatile case. Paolo