Ruby: include/ruby/internal/attr/diagnose_if.h Source File

Ruby 3.3.4p94 (2024-07-09 revision be1089c8ec5ba40e09b1553e36b3174bf4014d9d)

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
23#include "ruby/internal/has/attribute.h"
24#include "ruby/internal/warning_push.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 */
attribute.h
Defines RBIMPL_HAS_ATTRIBUTE.
warning_push.h
Defines RBIMPL_WARNING_PUSH.