mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Fix internal deprecation warnings (#4257)
This allows us to error out on deprecation warnings for thirdparty libraries and standard library features. Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com>
This commit is contained in:
@@ -9,4 +9,23 @@
|
||||
#define WPI_DEPRECATED(msg) [[deprecated(msg)]]
|
||||
#endif
|
||||
|
||||
#ifndef WPI_IGNORE_DEPRECATED
|
||||
#ifdef __GNUC__
|
||||
#define WPI_IGNORE_DEPRECATED \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
#elif defined(_WIN32)
|
||||
#define WPI_IGNORE_DEPRECATED _Pragma("warning(disable : 4996)")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef WPI_UNIGNORE_DEPRECATED
|
||||
#ifdef __GNUC__
|
||||
#define WPI_UNIGNORE_DEPRECATED _Pragma("GCC diagnostic pop")
|
||||
#elif defined(_WIN32)
|
||||
#define WPI_UNIGNORE_DEPRECATED _Pragma("warning(default : 4996)")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // WPIUTIL_WPI_DEPRECATED_H_
|
||||
|
||||
Reference in New Issue
Block a user