xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>, Ian Campbell <Ian.Campbell@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: [PATCH] xen/common: Uniformally use __ varients for attribute names
Date: Thu, 11 Feb 2016 19:51:42 +0000	[thread overview]
Message-ID: <1455220302-32685-1-git-send-email-andrew.cooper3@citrix.com> (raw)

Otherwise, debug code such as "void __attribute__((noreturn)) foobar()" fails
to compile when the noreturn itself gets expanded, resulting in
__attribute__((__attribute__((noreturn)))).

No function change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Tim Deegan <tim@xen.org>
CC: Ian Campbell <Ian.Campbell@citrix.com>
---
 xen/include/xen/compiler.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
index 4b3472d..892455b 100644
--- a/xen/include/xen/compiler.h
+++ b/xen/include/xen/compiler.h
@@ -11,12 +11,12 @@
 #define unlikely(x)   __builtin_expect(!!(x),0)
 
 #define inline        __inline__
-#define always_inline __inline__ __attribute__ ((always_inline))
-#define noinline      __attribute__((noinline))
+#define always_inline __inline__ __attribute__ ((__always_inline__))
+#define noinline      __attribute__((__noinline__))
 
-#define noreturn      __attribute__((noreturn))
+#define noreturn      __attribute__((__noreturn__))
 
-#define __packed      __attribute__((packed))
+#define __packed      __attribute__((__packed__))
 
 #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5))
 #define unreachable() do {} while (1)
@@ -43,7 +43,7 @@
 #define __inline__ __inline__ __init
 #endif
 
-#define __attribute_pure__  __attribute__((pure))
+#define __attribute_pure__  __attribute__((__pure__))
 #define __attribute_const__ __attribute__((__const__))
 
 /*
@@ -60,7 +60,7 @@
 #define __used         __attribute__((__used__))
 #define __maybe_unused __attribute__((__unused__))
 
-#define __must_check __attribute__((warn_unused_result))
+#define __must_check __attribute__((__warn_unused_result__))
 
 #define offsetof(a,b) __builtin_offsetof(a,b)
 
-- 
2.1.4

             reply	other threads:[~2016-02-11 19:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 19:51 Andrew Cooper [this message]
2016-02-12  9:16 ` [PATCH] xen/common: Uniformally use __ varients for attribute names Jan Beulich
2016-02-12  9:56   ` 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=1455220302-32685-1-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).