Received: from eggs.gnu.org ([2001:4830:134:3::10]:60076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ae0oF-00010D-2p for qemu-devel@nongnu.org; Thu, 10 Mar 2016 08:39:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ae0oB-0004wq-SZ for qemu-devel@nongnu.org; Thu, 10 Mar 2016 08:39:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ae0oB-0004wl-NU for qemu-devel@nongnu.org; Thu, 10 Mar 2016 08:39:19 -0500 From: Markus Armbruster References: <1457571335-10938-1-git-send-email-eblake@redhat.com> <1457571335-10938-5-git-send-email-eblake@redhat.com> Date: Thu, 10 Mar 2016 14:39:16 +0100 In-Reply-To: <1457571335-10938-5-git-send-email-eblake@redhat.com> (Eric Blake's message of "Wed, 9 Mar 2016 17:55:25 -0700") Message-ID: <8737rytptn.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v5 04/14] qapi: Adjust names of implicit types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, Michael Roth Eric Blake writes: > The original choice of ':obj-' as the prefix for implicit types > made it obvious that we weren't going to clash with any user-defined > names. But now we want to create structs for implicit types. Why? I know, but the commit message should still give a hint. Perhaps: "to get rid of special cases in the generators"? > We > could transliterate ':' to '_', except that C99 says that a leading > underscore and lower-case letter should be used only for file scope > identifiers, while we would be exposing it in qapi-types.h. So it's Misunderstanding! When the standard says "identifiers that X are reserved for Y use", it reserves these identifiers for itself and the implementation. You shouldn't use them for Y then. Suggest to simply quote the standard instead of interpreting it: ... except that C99 mandates that "identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces" > time to change our naming convention; we can instead use the 'q_' > prefix that we reserved for ourselves back in commit 9fb081e0. As > long as we don't declare 'empty' or 'obj' ticklish, it shouldn't > clash with c_name() prepending 'q_' to the user's ticklish names. Do we really want to rename :empty? We're not going to generate C for it, are we? > Signed-off-by: Eric Blake