MPD: Compiler.h File Reference

MPD 0.20.15

Macros
Compiler.h File Reference

Go to the source code of this file.

## Macros
#define | GCC_MAKE_VERSION(major, minor, patchlevel) ((major) * 10000 + (minor) * 100 + patchlevel)
#define | GCC_VERSION 0
#define | GCC_CHECK_VERSION(major, minor)
| Are we building with the specified version of gcc (not clang or any other compiler) or newer? More...
#define | CLANG_OR_GCC_VERSION(major, minor) (CLANG_VERSION > 0 || GCC_CHECK_VERSION(major, minor))
| Are we building with clang (any version) or at least the specified gcc version? More...
#define | GCC_OLDER_THAN(major, minor)
| Are we building with gcc (not clang or any other compiler) and a version older than the specified one? More...
#define | CLANG_CHECK_VERSION(major, minor) (CLANG_VERSION >= GCC_MAKE_VERSION(major, minor, 0))
| Are we building with the specified version of clang or newer? More...
#define | gcc_const
#define | gcc_deprecated
#define | gcc_may_alias
#define | gcc_malloc
#define | gcc_noreturn
#define | gcc_packed
#define | gcc_printf(a, b)
#define | gcc_pure
#define | gcc_sentinel
#define | gcc_unused
#define | gcc_warn_unused_result
#define | gcc_nonnull(...)
#define | gcc_nonnull_all
#define | gcc_likely(x) (x)
#define | gcc_unlikely(x) (x)
#define | gcc_visibility_hidden
#define | gcc_visibility_default
#define | gcc_always_inline inline
#define | gcc_hot
#define | gcc_cold
#define | gcc_flatten
#define | gcc_restrict restrict
#define | __has_feature(x) 0
#define | gcc_unused_field
#define | gcc_unreachable()

## Macro Definition Documentation

## ◆ __has_feature

#define __has_feature | ( |  | x | ) | 0

Definition at line 165 of file Compiler.h.

## ◆ CLANG_CHECK_VERSION

#define CLANG_CHECK_VERSION | ( |  | major,
|  |  | minor
| ) |  | (CLANG_VERSION >= GCC_MAKE_VERSION(major, minor, 0))

Are we building with the specified version of clang or newer?

Definition at line 75 of file Compiler.h.

## ◆ CLANG_OR_GCC_VERSION

#define CLANG_OR_GCC_VERSION | ( |  | major,
|  |  | minor
| ) |  | (CLANG_VERSION > 0 || GCC_CHECK_VERSION(major, minor))

Are we building with clang (any version) or at least the specified gcc version?

Definition at line 49 of file Compiler.h.

## ◆ gcc_always_inline

#define gcc_always_inline inline

Definition at line 130 of file Compiler.h.

## ◆ GCC_CHECK_VERSION

#define GCC_CHECK_VERSION | ( |  | major,
|  |  | minor
| ) |  |

Value:
(CLANG_VERSION == 0 && \
GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0))
GCC_MAKE_VERSION
#define GCC_MAKE_VERSION(major, minor, patchlevel)
Definition: Compiler.h:23

Are we building with the specified version of gcc (not clang or any other compiler) or newer?

Definition at line 41 of file Compiler.h.

## ◆ gcc_cold

#define gcc_cold

Definition at line 142 of file Compiler.h.

## ◆ gcc_const

#define gcc_const

Definition at line 109 of file Compiler.h.

## ◆ gcc_deprecated

#define gcc_deprecated

Definition at line 110 of file Compiler.h.

## ◆ gcc_flatten

#define gcc_flatten

Definition at line 149 of file Compiler.h.

## ◆ gcc_hot

#define gcc_hot

Definition at line 141 of file Compiler.h.

## ◆ gcc_likely

#define gcc_likely | ( |  | x | ) | (x)

Definition at line 124 of file Compiler.h.

## ◆ GCC_MAKE_VERSION

#define GCC_MAKE_VERSION | ( |  | major,
|  |  | minor,
|  |  | patchlevel
| ) |  | ((major) * 10000 + (minor) * 100 + patchlevel)

Definition at line 23 of file Compiler.h.

## ◆ gcc_malloc

#define gcc_malloc

Definition at line 112 of file Compiler.h.

## ◆ gcc_may_alias

#define gcc_may_alias

Definition at line 111 of file Compiler.h.

## ◆ gcc_nonnull

#define gcc_nonnull | ( |  | ... | ) |

Definition at line 121 of file Compiler.h.

## ◆ gcc_nonnull_all

#define gcc_nonnull_all

Definition at line 122 of file Compiler.h.

## ◆ gcc_noreturn

#define gcc_noreturn

Definition at line 113 of file Compiler.h.

## ◆ GCC_OLDER_THAN

#define GCC_OLDER_THAN | ( |  | major,
|  |  | minor
| ) |  |

Value:
(GCC_VERSION > 0 && CLANG_VERSION == 0 && \
GCC_VERSION < GCC_MAKE_VERSION(major, minor, 0))
GCC_VERSION
#define GCC_VERSION
Definition: Compiler.h:28
GCC_MAKE_VERSION
#define GCC_MAKE_VERSION(major, minor, patchlevel)
Definition: Compiler.h:23

Are we building with gcc (not clang or any other compiler) and a version older than the specified one?

Definition at line 56 of file Compiler.h.

## ◆ gcc_packed

#define gcc_packed

Definition at line 114 of file Compiler.h.

## ◆ gcc_printf

#define gcc_printf | ( |  | a,
|  |  | b
| ) |  |

Definition at line 115 of file Compiler.h.

## ◆ gcc_pure

#define gcc_pure

Definition at line 116 of file Compiler.h.

## ◆ gcc_restrict

#define gcc_restrict restrict

Definition at line 154 of file Compiler.h.

## ◆ gcc_sentinel

#define gcc_sentinel

Definition at line 117 of file Compiler.h.

## ◆ gcc_unlikely

#define gcc_unlikely | ( |  | x | ) | (x)

Definition at line 125 of file Compiler.h.

## ◆ gcc_unreachable

#define gcc_unreachable | ( |  | ) |

Definition at line 177 of file Compiler.h.

## ◆ gcc_unused

#define gcc_unused

Definition at line 118 of file Compiler.h.

## ◆ gcc_unused_field

#define gcc_unused_field

Definition at line 171 of file Compiler.h.

## ◆ GCC_VERSION

#define GCC_VERSION 0

Definition at line 28 of file Compiler.h.

## ◆ gcc_visibility_default

#define gcc_visibility_default

Definition at line 128 of file Compiler.h.

## ◆ gcc_visibility_hidden

#define gcc_visibility_hidden

Definition at line 127 of file Compiler.h.

## ◆ gcc_warn_unused_result

#define gcc_warn_unused_result

Definition at line 119 of file Compiler.h.