Skip to content

Commit

Permalink
compiler.h: remove QEMU_GNUC_PREREQ
Browse files Browse the repository at this point in the history
When needed, the G_GNUC_CHECK_VERSION() glib macro can be used instead.

Signed-off-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
elmarco authored and bonzini committed Dec 15, 2020
1 parent 36c5e0b commit 07b35a2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
11 changes: 0 additions & 11 deletions include/qemu/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@
#define QEMU_STATIC_ANALYSIS 1
#endif

/*----------------------------------------------------------------------------
| The macro QEMU_GNUC_PREREQ tests for minimum version of the GNU C compiler.
| The code is a copy of SOFTFLOAT_GNUC_PREREQ, see softfloat-macros.h.
*----------------------------------------------------------------------------*/
#if defined(__GNUC__) && defined(__GNUC_MINOR__)
# define QEMU_GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#else
# define QEMU_GNUC_PREREQ(maj, min) 0
#endif

#define QEMU_NORETURN __attribute__ ((__noreturn__))

#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
Expand Down
1 change: 0 additions & 1 deletion scripts/cocci-macro-file.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/

/* From qemu/compiler.h */
#define QEMU_GNUC_PREREQ(maj, min) 1
#define QEMU_NORETURN __attribute__ ((__noreturn__))
#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#define QEMU_SENTINEL __attribute__((sentinel))
Expand Down

0 comments on commit 07b35a2

Please sign in to comment.