Ruby  3.4.0dev (2024-11-05 revision e440268d51fe02b303e3817a7a733a0dac1c5091)
diagnose_if.h
Go to the documentation of this file.
1 #ifndef RBIMPL_ATTR_DIAGNOSE_IF_H /*-*-C++-*-vi:se ft=cpp:*/
2 #define RBIMPL_ATTR_DIAGNOSE_IF_H
25 
27 #if RBIMPL_COMPILER_BEFORE(Clang, 5, 0, 0)
28 # /* https://bugs.llvm.org/show_bug.cgi?id=34319 */
29 # define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) /* void */
30 
31 #elif RBIMPL_HAS_ATTRIBUTE(diagnose_if)
32 # define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) \
33  RBIMPL_WARNING_PUSH() \
34  RBIMPL_WARNING_IGNORED(-Wgcc-compat) \
35  __attribute__((__diagnose_if__(_, __, ___))) \
36  RBIMPL_WARNING_POP()
37 
38 #else
39 # define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) /* void */
40 #endif
41 
42 #endif /* RBIMPL_ATTR_DIAGNOSE_IF_H */
Defines RBIMPL_HAS_ATTRIBUTE.
Defines RBIMPL_WARNING_PUSH.