From: "Jan Beulich" Subject: Re: [PATCH v2] RFC: Automatically check xen's public headers for C++ pitfalls. Date: Fri, 27 Feb 2015 08:00:27 +0000 Message-ID: <54F0322B02000078000646C0@mail.emea.novell.com> References: <1424956264-15271-1-git-send-email-tim@xen.org> <1424967096-6105-1-git-send-email-tim@xen.org> <20150226162842.GG43832@deinos.phlegethon.org> <54EF5C3302000078000643ED@mail.emea.novell.com> <20150226170154.GB43834@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150226170154.GB43834@deinos.phlegethon.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 26.02.15 at 18:01, wrote: > At 16:47 +0000 on 26 Feb (1424965651), Jan Beulich wrote: >> >>> On 26.02.15 at 17:28, wrote: >> > At 16:11 +0000 on 26 Feb (1424963496), Tim Deegan wrote: >> >> Explicitly _not_ addressing the use of 'private' in various fields, >> >> since we'd previously decided not to fix that. >> > >> > BTW, ring.h is the only instance of that, so the extra diff to clear >> > that up too is pretty small (see below). >> > >> > Not sure what people think about that though - it might be >> > quite a PITA for downstream users of it, though they ought really to >> > be using local copies so they can update in a controlled way. >> >> linux-2.6.18-xen.hg always having consumed them (almost) >> verbatim, I don't think we should break users not massaging >> the headers. I.e. at least make the field name conditional upon >> using C vs C++. > > Something like this? This is the kind of uglification that I would > like to avoid, though (and I don't like '#define private pvt' much > either). Yes, and perhaps the definition part put into xen-compat.h instead of io/ring.h (e.g. as XEN_PRIVATE, or - leaving room in case C++ grows more keywords - a more generic XEN_CXX()). I don't view this as all that ugly. Jan