From: Tim Deegan Subject: Re: [PATCH v3] RFC: Automatically check xen's public headers for C++ pitfalls. Date: Fri, 27 Feb 2015 10:22:22 +0100 Message-ID: <20150227092222.GA37764@deinos.phlegethon.org> References: <1424956264-15271-1-git-send-email-tim@xen.org> <1424967893-21641-1-git-send-email-tim@xen.org> <54F03A920200007800064719@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54F03A920200007800064719@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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). Would you like to change that too? Tim.