From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScJP2-00082Y-Gy for qemu-devel@nongnu.org; Wed, 06 Jun 2012 12:48:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScJOw-0006xl-CY for qemu-devel@nongnu.org; Wed, 06 Jun 2012 12:48:12 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:51615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScJOw-0006xZ-3X for qemu-devel@nongnu.org; Wed, 06 Jun 2012 12:48:06 -0400 Received: by dadv2 with SMTP id v2so9806869dad.4 for ; Wed, 06 Jun 2012 09:48:03 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4FCF89A2.3060704@redhat.com> Date: Wed, 06 Jun 2012 18:47:30 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1337683555-13301-1-git-send-email-lersek@redhat.com> <4FCE7684.2070206@redhat.com> <4FCF5512.9000704@redhat.com> <4FCF5BA8.3010201@suse.de> <4FCF64E4.50701@redhat.com> <20120606151640.GA7733@illuin> <4FCF777B.7000806@redhat.com> <20120606161446.GC7733@illuin> In-Reply-To: <20120606161446.GC7733@illuin> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: Laszlo Ersek , =?ISO-8859-1?Q?Andreas_F=E4rber?= , qemu-devel@nongnu.org Il 06/06/2012 18:14, Michael Roth ha scritto: > uint64_t's > within the valid range for visit_type_uint64() will fail due to being > interpreted as < 0 when cast to int64_t. With the others we can detect > these cases since the max unsigned value doesn't exceed the max signed > value of the intermediate type we're storing to. Right, let's leave out the change for uint64, which works for visitors that transparently convert -2^64..-1 to 2^63..2^64-1 or the other way round. String and QemuOpts visitors can still add the method, do proper range checking and report the error themselves. Also, Laszlo, your new visit_type_size should fall back to uint64 rather than int. Paolo