From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcFgR-0005dO-Fm for qemu-devel@nongnu.org; Sun, 29 Mar 2015 12:03:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcFgO-0001yY-BG for qemu-devel@nongnu.org; Sun, 29 Mar 2015 12:03:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcFgO-0001yF-5s for qemu-devel@nongnu.org; Sun, 29 Mar 2015 12:03:28 -0400 From: Markus Armbruster References: <1427227433-5030-1-git-send-email-eblake@redhat.com> Date: Sun, 29 Mar 2015 18:03:24 +0200 In-Reply-To: <1427227433-5030-1-git-send-email-eblake@redhat.com> (Eric Blake's message of "Tue, 24 Mar 2015 14:03:25 -0600") Message-ID: <871tk723lf.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v5 00/28] drop qapi nested structs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, lcapitulino@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, wenchaoqemu@gmail.com What happens when I define a member key multiple times in a struct or union type? If I do it directly, the parser rejects the duplicate key in get_members(). Covered by tests/qapi-schema/duplicate-key.json. What if I hide the duplicate in a base type? If I stick this into qapi-schema-test.json: { 'type': 'Base', 'data': { 'foo': 'str', 'bar': 'str' } } { 'type': 'Clash', 'base': 'Base', 'data': { 'foo': 'int' } } { 'command': 'clash', 'data': 'Clash' } the resulting test-qmp-commands.h declares qmp_clash(), but test-qmp-marshal.c doesn't define it. WTF?!?