Received: from eggs.gnu.org ([2001:4830:134:3::10]:53297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWhkF-0005pK-Gm for qemu-devel@nongnu.org; Mon, 08 Aug 2016 06:25:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWhkB-0006uL-8s for qemu-devel@nongnu.org; Mon, 08 Aug 2016 06:25:18 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:34481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWhkB-0006u9-1l for qemu-devel@nongnu.org; Mon, 08 Aug 2016 06:25:15 -0400 Received: by mail-pf0-x241.google.com with SMTP id g202so24849486pfb.1 for ; Mon, 08 Aug 2016 03:25:14 -0700 (PDT) Sender: Richard Henderson 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> <1ced2a30-ef21-c14a-bd76-780fe2d20f73@redhat.com> From: Richard Henderson Message-ID: <30eac7b1-7644-b32f-5704-fb312ae6b8da@twiddle.net> Date: Mon, 8 Aug 2016 15:55:05 +0530 MIME-Version: 1.0 In-Reply-To: <1ced2a30-ef21-c14a-bd76-780fe2d20f73@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed 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: Paolo Bonzini , 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 03:32 PM, Paolo Bonzini wrote: > > > 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. ... and, eventually, the _Atomic case. I really should have finished the __typeof_noqual patch that I was working on some years ago... Ho hum. r~