Loading...
Searching...
No Matches
Go to the documentation of this file.
7#define __has_attribute(x) 0
11#define __has_builtin(x) 0
14#if defined(__GNUC__) && defined(__GNUC_MINOR__)
15#define GIRARA_GNUC_CHECK(maj, min) (((__GNUC__ << 20) + (__GNUC_MINOR__ << 10)) >= (((maj) << 20) + ((min) << 10)))
17#define GIRARA_GNUC_CHECK(maj, min) 0
21#if GIRARA_GNUC_CHECK(2, 5) || defined(__clang__)
22#define GIRARA_PRINTF(format_idx, arg_idx) __attribute__((__format__(__printf__, format_idx, arg_idx)))
24#define GIRARA_PRINTF(format_idx, arg_idx)
29#if defined(__GNUC__) || defined(__clang__)
30#define GIRARA_UNUSED(x) UNUSED_##x __attribute__((unused))
31#elif defined(__LCLINT__)
32#define GIRARA_UNUSED(x) x
34#define GIRARA_UNUSED(x) x
39#if GIRARA_GNUC_CHECK(4, 0) || __has_attribute(visibility)
40#define GIRARA_HIDDEN __attribute__((visibility("hidden")))
41#elif defined(__SUNPRO_C)
42#define GIRARA_HIDDEN __hidden
49#if GIRARA_GNUC_CHECK(4, 0) || __has_attribute(visibility)
50#define GIRARA_VISIBLE __attribute__((visibility("default")))
56#ifndef GIRARA_DEPRECATED
57#if defined(__GNUC__) || __has_attribute(deprecated)
58#define GIRARA_DEPRECATED(x) x __attribute__((deprecated))
59#define GIRARA_DEPRECATED_ __attribute__((deprecated))
61#define GIRARA_DEPRECATED(x) x
62#define GIRARA_DEPRECATED_
66#ifndef GIRARA_ALLOC_SIZE
67#if (!defined(__clang__) && GIRARA_GNUC_CHECK(4, 3)) || (defined(__clang__) && __has_attribute(__alloc_size__))
68#define GIRARA_ALLOC_SIZE(...) __attribute__((alloc_size(__VA_ARGS__)))
70#define GIRARA_ALLOC_SIZE(x)
74#ifndef GIRARA_DO_PRAGMA
75#if defined(__GNUC__) || defined(__clang__)
76#define GIRARA_DO_PRAGMA(x) _Pragma(#x)
78#define GIRARA_DO_PRAGMA(x)
82#ifndef GIRARA_IGNORE_DEPRECATED
83#define GIRARA_IGNORE_DEPRECATED \
84 GIRARA_DO_PRAGMA(GCC diagnostic push) \
85 GIRARA_DO_PRAGMA(GCC diagnostic ignored "-Wdeprecated-declarations")
88#ifndef GIRARA_UNIGNORE
89#define GIRARA_UNIGNORE GIRARA_DO_PRAGMA(GCC diagnostic pop)