Skip to content

Commit 0da23b0

Browse files
A macro to disable deprecation warnings with _Pragma
1 parent ef8347b commit 0da23b0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/common/src/mlib/config.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,13 @@
291291
#define _mlibTestBuildConfig_RelWithDebInfo_RelWithDebInfo()
292292
#define _mlibTestBuildConfig_MinSizeRel_MinSizeRel()
293293

294+
/**
295+
* @brief Emit a _Pragma that will disable warnings about the use of deprecated entities.
296+
*/
297+
#define mlib_disable_deprecation_warnings() \
298+
mlib_gnu_warning_disable ("-Wdeprecated-declarations"); \
299+
mlib_msvc_warning (disable : 4996)
300+
294301
/**
295302
* @brief Function-like macro that expands to `1` if we are certain that we are
296303
* compiling with optimizations enabled.

0 commit comments

Comments
 (0)