|
145 | 145 | #define TOOLCHAIN_IGNORE_WSHADOW_END
|
146 | 146 | #endif
|
147 | 147 |
|
| 148 | +/** |
| 149 | + * @def TOOLCHAIN_PRAGMA |
| 150 | + * @brief Helper for using pragma in macros. |
| 151 | + */ |
| 152 | +#ifdef TOOLCHAIN_HAS_PRAGMA_DIAG |
| 153 | +#define TOOLCHAIN_PRAGMA(x) _Pragma(#x) |
| 154 | +#else |
| 155 | +#define TOOLCHAIN_PRAGMA(x) |
| 156 | +#endif |
| 157 | + |
| 158 | +/** |
| 159 | + * @def TOOLCHAIN_DISABLE_WARNING |
| 160 | + * @brief Disable the specified compiler warning for all compilers. |
| 161 | + */ |
| 162 | +#ifndef TOOLCHAIN_DISABLE_WARNING |
| 163 | +#define TOOLCHAIN_DISABLE_WARNING(warning) |
| 164 | +#endif |
| 165 | + |
| 166 | +/** |
| 167 | + * @def TOOLCHAIN_ENABLE_WARNING |
| 168 | + * @brief Re-enable the specified compiler warning for all compilers. |
| 169 | + * |
| 170 | + * Can only be used after a call to @ref TOOLCHAIN_DISABLE_WARNING. |
| 171 | + */ |
| 172 | +#ifndef TOOLCHAIN_ENABLE_WARNING |
| 173 | +#define TOOLCHAIN_ENABLE_WARNING(warning) |
| 174 | +#endif |
| 175 | + |
| 176 | +/** |
| 177 | + * @def TOOLCHAIN_DISABLE_CLANG_WARNING |
| 178 | + * @brief Disable the specified compiler warning for clang. |
| 179 | + */ |
| 180 | +#ifndef TOOLCHAIN_DISABLE_CLANG_WARNING |
| 181 | +#define TOOLCHAIN_DISABLE_CLANG_WARNING(warning) |
| 182 | +#endif |
| 183 | + |
| 184 | +/** |
| 185 | + * @def TOOLCHAIN_ENABLE_CLANG_WARNING |
| 186 | + * @brief Re-enable the specified compiler warning for clang. |
| 187 | + * |
| 188 | + * Can only be used after a call to @ref TOOLCHAIN_DISABLE_CLANG_WARNING. |
| 189 | + */ |
| 190 | +#ifndef TOOLCHAIN_ENABLE_CLANG_WARNING |
| 191 | +#define TOOLCHAIN_ENABLE_CLANG_WARNING(warning) |
| 192 | +#endif |
| 193 | + |
| 194 | +/** |
| 195 | + * @def TOOLCHAIN_DISABLE_GCC_WARNING |
| 196 | + * @brief Disable the specified compiler warning for gcc. |
| 197 | + */ |
| 198 | +#ifndef TOOLCHAIN_DISABLE_GCC_WARNING |
| 199 | +#define TOOLCHAIN_DISABLE_GCC_WARNING(warning) |
| 200 | +#endif |
| 201 | + |
| 202 | +/** |
| 203 | + * @def TOOLCHAIN_ENABLE_GCC_WARNING |
| 204 | + * @brief Re-enable the specified compiler warning for gcc. |
| 205 | + * |
| 206 | + * Can only be used after a call to @ref TOOLCHAIN_DISABLE_GCC_WARNING. |
| 207 | + */ |
| 208 | +#ifndef TOOLCHAIN_ENABLE_GCC_WARNING |
| 209 | +#define TOOLCHAIN_ENABLE_GCC_WARNING(warning) |
| 210 | +#endif |
| 211 | + |
148 | 212 | /*
|
149 | 213 | * Ensure that __BYTE_ORDER__ and related preprocessor definitions are defined,
|
150 | 214 | * and that they match the Kconfig option that is used in the code itself to
|
|
0 commit comments