Loading...
Searching...
No Matches
Go to the documentation of this file.
14#ifndef PLASK_WARNINGS_H
15#define PLASK_WARNINGS_H
22 #define PLASK_PRAGMA(x) __pragma(x)
25 #define PLASK_PRAGMA(x) _Pragma(#x)
31 #define PLASK_UNUSED(arg) arg
33 #define PLASK_UNUSED(arg)
40#define PLASK_NO_CONVERSION_WARNING_BEGIN \
41 PLASK_PRAGMA(warning(push)) \
42 PLASK_PRAGMA(warning(disable: 4244))
44#define PLASK_NO_UNUSED_VARIABLE_WARNING_BEGIN \
45 PLASK_PRAGMA(warning(push)) \
46 PLASK_PRAGMA(warning(disable: 4101))
48#define PLASK_NO_WARNING_END \
49 PLASK_PRAGMA(warning(pop))
51#elif defined(__GNUC__)
53#define PLASK_NO_CONVERSION_WARNING_BEGIN \
54 PLASK_PRAGMA(GCC diagnostic push) \
55 PLASK_PRAGMA(GCC diagnostic ignored "-Wconversion")
57#define PLASK_NO_UNUSED_VARIABLE_WARNING_BEGIN \
58 PLASK_PRAGMA(GCC diagnostic push) \
59 PLASK_PRAGMA(GCC diagnostic ignored "-Wunused-variable")
61#define PLASK_NO_WARNING_END \
62 PLASK_PRAGMA(GCC diagnostic pop)
64#elif defined(__clang__)
66#define PLASK_NO_CONVERSION_WARNING_BEGIN \
67 PLASK_PRAGMA(clang diagnostic push) \
68 PLASK_PRAGMA(clang diagnostic ignored "-Wconversion")
70#define PLASK_NO_UNUSED_VARIABLE_WARNING_BEGIN \
71 PLASK_PRAGMA(clang diagnostic push) \
72 PLASK_PRAGMA(clang diagnostic ignored "-Wunused-variable")
74#define PLASK_NO_WARNING_END \
75 PLASK_PRAGMA(clang diagnostic pop)
80#define PLASK_NO_CONVERSION_WARNING_BEGIN
83#define PLASK_NO_UNUSED_VARIABLE_WARNING_BEGIN
86#define PLASK_NO_WARNING_END