All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Lin Liu <lin.liu@citrix.com>, <xen-devel@lists.xenproject.org>
Cc: George Dunlap <george.dunlap@citrix.com>,
	Ian Jackson <iwj@xenproject.org>, Jan Beulich <jbeulich@suse.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH v2 1/7] xen: implement byteswap.h
Date: Fri, 22 Oct 2021 15:00:57 +0100	[thread overview]
Message-ID: <ca9c27b5-26ef-dce5-4abd-83cb7d24241e@citrix.com> (raw)
In-Reply-To: <89afdafa9020ab77b9d662bd5c8f7b2d31e53c5c.1634897942.git.lin.liu@citrix.com>

On 22/10/2021 11:47, Lin Liu wrote:
> diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
> index 696c7eb89e..68f28082a5 100644
> --- a/xen/include/xen/compiler.h
> +++ b/xen/include/xen/compiler.h
> @@ -179,4 +179,16 @@
>  # define CLANG_DISABLE_WARN_GCC_COMPAT_END
>  #endif
>  
> +#if (!defined(__clang__) && (__GNUC__ < 10))

This too lost my feedback.

It needs to be #ifndef __has_builtin because otherwise a random GCC 10
build I have fails with:

/local/security/xen.git/xen/include/xen/byteswap.h:6:19: error: missing
binary operator before token "("
    6 | #if !__has_builtin(__builtin_bswap16)


I suspect it was a build of GCC 10 before __has_builtin() support was
added, but either way, we should be predicating on __has_builtin itself,
not version guesswork.

~Andrew



  reply	other threads:[~2021-10-22 14:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 10:47 [PATCH v2 0/7] Implement byteswap and update references Lin Liu
2021-10-22 10:47 ` [PATCH v2 1/7] xen: implement byteswap.h Lin Liu
2021-10-22 14:00   ` Andrew Cooper [this message]
2021-11-02 14:23   ` Jan Beulich
2021-10-22 10:47 ` [PATCH v2 2/7] crypto/vmac: Simplify code with byteswap.h Lin Liu
2021-11-02 15:00   ` Jan Beulich
2021-10-22 10:47 ` [PATCH v2 3/7] arm64/find_next_bit: Remove ext2_swab() Lin Liu
2021-10-22 10:47 ` [PATCH v2 4/7] arm: Switch to byteswap.h Lin Liu
2021-10-22 10:47 ` [PATCH v2 5/7] xen/xsm: " Lin Liu
2021-10-22 15:46   ` Daniel P. Smith
2021-11-02 15:18     ` Jan Beulich
2021-10-22 10:47 ` [PATCH v2 6/7] xen: " Lin Liu
2021-10-22 11:25   ` Andrew Cooper
2021-11-02 15:23   ` Jan Beulich
2021-10-22 10:47 ` [PATCH v2 7/7] byteorder: Remove byteorder Lin Liu
2021-10-22 11:50 ` [PATCH v2 0/7] Implement byteswap and update references Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca9c27b5-26ef-dce5-4abd-83cb7d24241e@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=lin.liu@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.