로딩중...
검색중...
일치하는것 없음
warning.hpp
이 파일의 문서화 페이지로 가기
1
2#pragma once
3
4#include "helper.hpp"
5
6// clang-format off
7
8#if defined(__clang__)
9# define BY_WARN_PUSH _Pragma("clang diagnostic push")
10# define BY_WARN_IGNORE(warn) _Pragma(BY_STR(clang diagnostic ignored #warn))
11# define BY_WARN_IGNORE_AUTOLOGICAL_COMPARE BY_WARN_IGNORE(-Wtautological-undefined-compare)
12# define BY_WARN_IGNORE_UNUSED_FUNCTION BY_WARN_IGNORE(-Wunused-function)
13# define BY_WARN_POP _Pragma("clang diagnostic pop")
14#elif defined(__GNUC__)
15# define BY_WARN_PUSH _Pragma("GCC diagnostic push")
16# define BY_WARN_IGNORE(warn) _Pragma(BY_STR(GCC diagnostic ignored #warn))
17# define BY_WARN_IGNORE_AUTOLOGICAL_COMPARE
18# define BY_WARN_IGNORE_UNUSED_FUNCTION BY_WARN_IGNORE(-Wunused-function)
19# define BY_WARN_POP _Pragma("GCC diagnostic pop")
20#else
21# define BY_WARN_PUSH
22# define BY_WARN_IGNORE(warn)
23# define BY_WARN_IGNORE_AUTOLOGICAL_COMPARE
24# define BY_WARN_IGNORE_UNUSED_FUNCTION
25# define BY_WARN_POP
26#endif
27
28// clang-format on