|
Ada 3.4.4
Fast spec-compliant URL parser
|
Cross-platform compiler macros and common definitions. More...
#include <version>Go to the source code of this file.
Namespaces | |
| namespace | ada |
Macros | |
| #define | ADA_BEGIN_DEBUG_BLOCK(name) |
| #define | ADA_END_DEBUG_BLOCK(name) |
| #define | ADA_DEBUG_BLOCK(name, block) |
| #define | ADA_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1)) |
| #define | ADA_ROUNDDOWN_N(a, n) ((a) & ~((n)-1)) |
| #define | ADA_ISALIGNED_N(ptr, n) (((uintptr_t)(ptr) & ((n)-1)) == 0) |
| #define | ada_really_inline inline __attribute__((always_inline)) |
| #define | ada_never_inline inline __attribute__((noinline)) |
| #define | ada_unused __attribute__((unused)) |
| #define | ada_warn_unused __attribute__((warn_unused_result)) |
| #define | ADA_PUSH_DISABLE_WARNINGS _Pragma("GCC diagnostic push") |
| #define | ADA_PUSH_DISABLE_ALL_WARNINGS |
| #define | ADA_PRAGMA(P) _Pragma(#P) |
| #define | ADA_DISABLE_GCC_WARNING(WARNING) ADA_PRAGMA(GCC diagnostic ignored WARNING) |
| #define | ADA_DISABLE_UNDESIRED_WARNINGS |
| #define | ADA_DISABLE_DEPRECATED_WARNING ADA_DISABLE_GCC_WARNING("-Wdeprecated-declarations") |
| #define | ADA_DISABLE_STRICT_OVERFLOW_WARNING ADA_DISABLE_GCC_WARNING("-Wstrict-overflow") |
| #define | ADA_POP_DISABLE_WARNINGS _Pragma("GCC diagnostic pop") |
| #define | ADA_DLLIMPORTEXPORT |
| #define | ADA_TRY(EXPR) |
| If EXPR is an error, returns it. | |
| #define | __has_cpp_attribute(x) 0 |
| #define | ADA_ATTRIBUTE_NOINLINE |
| #define | ADA_DEVELOPMENT_CHECKS 1 |
| #define | ADA_STR(x) #x |
| #define | ADA_REQUIRE(EXPR) |
| #define | ADA_FAIL(MESSAGE) |
| #define | ADA_ASSERT_EQUAL(LHS, RHS, MESSAGE) |
| #define | ADA_ASSERT_TRUE(COND) |
| #define | ADA_ASSUME(COND) |
| #define | ada_lifetime_bound |
| #define | ADA_INCLUDE_URL_PATTERN 1 |
Functions | |
| void | ada::unreachable () |
Cross-platform compiler macros and common definitions.
This header provides compiler-specific macros for optimization hints, platform detection, SIMD support detection, and development/debug utilities. It ensures consistent behavior across different compilers (GCC, Clang, MSVC).
Definition in file common_defs.h.
| #define __has_cpp_attribute | ( | x | ) | 0 |
Definition at line 151 of file common_defs.h.
| #define ADA_ASSERT_EQUAL | ( | LHS, | |
| RHS, | |||
| MESSAGE | |||
| ) |
Definition at line 208 of file common_defs.h.
| #define ADA_ASSERT_TRUE | ( | COND | ) |
Definition at line 215 of file common_defs.h.
| #define ADA_ASSUME | ( | COND | ) |
Definition at line 232 of file common_defs.h.
| #define ADA_ATTRIBUTE_NOINLINE |
Definition at line 157 of file common_defs.h.
| #define ADA_BEGIN_DEBUG_BLOCK | ( | name | ) |
Definition at line 41 of file common_defs.h.
| #define ADA_DEBUG_BLOCK | ( | name, | |
| block | |||
| ) |
Definition at line 43 of file common_defs.h.
| #define ADA_DEVELOPMENT_CHECKS 1 |
Definition at line 191 of file common_defs.h.
| #define ADA_DISABLE_DEPRECATED_WARNING ADA_DISABLE_GCC_WARNING("-Wdeprecated-declarations") |
Definition at line 117 of file common_defs.h.
| #define ADA_DISABLE_GCC_WARNING | ( | WARNING | ) | ADA_PRAGMA(GCC diagnostic ignored WARNING) |
Definition at line 109 of file common_defs.h.
| #define ADA_DISABLE_STRICT_OVERFLOW_WARNING ADA_DISABLE_GCC_WARNING("-Wstrict-overflow") |
Definition at line 119 of file common_defs.h.
| #define ADA_DISABLE_UNDESIRED_WARNINGS |
Definition at line 115 of file common_defs.h.
| #define ADA_DLLIMPORTEXPORT |
Definition at line 137 of file common_defs.h.
| #define ADA_END_DEBUG_BLOCK | ( | name | ) |
Definition at line 42 of file common_defs.h.
| #define ADA_FAIL | ( | MESSAGE | ) |
Definition at line 203 of file common_defs.h.
| #define ADA_INCLUDE_URL_PATTERN 1 |
Definition at line 283 of file common_defs.h.
| #define ADA_ISALIGNED_N | ( | ptr, | |
| n | |||
| ) | (((uintptr_t)(ptr) & ((n)-1)) == 0) |
Definition at line 50 of file common_defs.h.
| #define ada_lifetime_bound |
Definition at line 272 of file common_defs.h.
| #define ada_never_inline inline __attribute__((noinline)) |
Definition at line 86 of file common_defs.h.
| #define ADA_POP_DISABLE_WARNINGS _Pragma("GCC diagnostic pop") |
Definition at line 121 of file common_defs.h.
| #define ADA_PRAGMA | ( | P | ) | _Pragma(#P) |
Definition at line 108 of file common_defs.h.
| #define ADA_PUSH_DISABLE_ALL_WARNINGS |
Definition at line 94 of file common_defs.h.
| #define ADA_PUSH_DISABLE_WARNINGS _Pragma("GCC diagnostic push") |
Definition at line 91 of file common_defs.h.
| #define ada_really_inline inline __attribute__((always_inline)) |
Definition at line 85 of file common_defs.h.
| #define ADA_REQUIRE | ( | EXPR | ) |
Definition at line 199 of file common_defs.h.
| #define ADA_ROUNDDOWN_N | ( | a, | |
| n | |||
| ) | ((a) & ~((n)-1)) |
Definition at line 48 of file common_defs.h.
| #define ADA_ROUNDUP_N | ( | a, | |
| n | |||
| ) | (((a) + ((n)-1)) & ~((n)-1)) |
Definition at line 47 of file common_defs.h.
| #define ADA_STR | ( | x | ) | #x |
Definition at line 196 of file common_defs.h.
| #define ADA_TRY | ( | EXPR | ) |
If EXPR is an error, returns it.
Definition at line 141 of file common_defs.h.
| #define ada_unused __attribute__((unused)) |
Definition at line 88 of file common_defs.h.
| #define ada_warn_unused __attribute__((warn_unused_result)) |
Definition at line 89 of file common_defs.h.