refactor: Move warn_ctrl.h into lib_system

This is another logging dep
This commit is contained in:
John Colvin committed 2024-11-26 04:33:05 +00:00
1 parent ee4308cb73
commit a412f96701
2 files changed
+20 -17

No files matched your search

+1 -17
View File
@@ -1,19 +1,3 @@
#pragma once
#ifdef __GNUC__
#define GCC_DIAG_STR(s) #s
#define GCC_DIAG_JOINSTR(x, y) GCC_DIAG_STR(x##y)
#define GCC_DIAG_DO_PRAGMA(x) _Pragma(#x)
#define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
#define GCC_DIAG_OFF(x) \
GCC_DIAG_PRAGMA(push) \
GCC_DIAG_PRAGMA(ignored x)
#define GCC_DIAG_RESTORE() GCC_DIAG_PRAGMA(pop)
#define WIN32_DIAG_OFF(x)
#define WIN32_DIAG_RESTORE()
#else
#define GCC_DIAG_OFF(x)
#define GCC_DIAG_RESTORE()
#define WIN32_DIAG_OFF(x) __pragma(warning(push)) __pragma(warning(disable : x))
#define WIN32_DIAG_RESTORE() __pragma(warning(pop))
#endif
#include "system/warn_ctrl.h"
+19
View File
@@ -0,0 +1,19 @@
#pragma once
#ifdef __GNUC__
#define GCC_DIAG_STR(s) #s
#define GCC_DIAG_JOINSTR(x, y) GCC_DIAG_STR(x##y)
#define GCC_DIAG_DO_PRAGMA(x) _Pragma(#x)
#define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
#define GCC_DIAG_OFF(x) \
GCC_DIAG_PRAGMA(push) \
GCC_DIAG_PRAGMA(ignored x)
#define GCC_DIAG_RESTORE() GCC_DIAG_PRAGMA(pop)
#define WIN32_DIAG_OFF(x)
#define WIN32_DIAG_RESTORE()
#else
#define GCC_DIAG_OFF(x)
#define GCC_DIAG_RESTORE()
#define WIN32_DIAG_OFF(x) __pragma(warning(push)) __pragma(warning(disable : x))
#define WIN32_DIAG_RESTORE() __pragma(warning(pop))
#endif