From: "Jan Beulich" Subject: Re: [PATCH v3] RFC: Automatically check xen's public headers for C++ pitfalls. Date: Fri, 27 Feb 2015 09:34:36 +0000 Message-ID: <54F0483C0200007800064779@mail.emea.novell.com> References: <1424956264-15271-1-git-send-email-tim@xen.org> <1424967893-21641-1-git-send-email-tim@xen.org> <54F03A920200007800064719@mail.emea.novell.com> <20150227092222.GA37764@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150227092222.GA37764@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 27.02.15 at 10:22, wrote: > At 08:36 +0000 on 27 Feb (1425022578), Jan Beulich wrote: >> >>> On 26.02.15 at 17:24, wrote: >> > +PUBLIC_ANSI_HEADERS := $(filter-out public/%ctl.h public/xsm/% > public/%hvm/save.h, $(PUBLIC_HEADERS)) >> > + >> > +headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile >> > + for i in $(filter %.h,$^); do \ >> > + $(CC) -x c -ansi -Wall -Werror -include stdint.h \ >> > + -S -o /dev/null $$i || exit 1; \ >> > + echo $$i; \ >> > + done >$@.new >> > + mv $@.new $@ >> > + >> > +headers++.chk: $(PUBLIC_HEADERS) Makefile >> > + if $(CXX) -v >/dev/null 2>&1; then \ >> > + for i in $(filter %.h,$^); do \ >> > + $(CXX) -x c++ -std=gnu++98 -Wall -Werror \ >> > + -D__XEN_TOOLS__ -Dprivate=private_is_a_keyword_in_cpp \ >> >> With -D__XEN_TOOLS__ added, did you check that domctl.h and >> sysctl.h still actually need to be excluded from this test? > > The C++ check includes those headers and defines __XEN_TOOLS__; the > ANSI C check does neither (as before). Argh - I again didn't look closely enough; I'm sorry. > Would you like to change that too? No. Ack on v3 then. Jan