Ruby: include/ruby/internal/compiler_since.h Source File

Ruby 4.0.5p0 (2026-05-20 revision 64336ffd0ee9e1f4c05891695a3d7b49cb709721)

compiler_since.h
Go to the documentation of this file.
1#ifndef RBIMPL_COMPILER_SINCE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_COMPILER_SINCE_H
23#include "ruby/internal/compiler_is.h"
24
35#define RBIMPL_COMPILER_SINCE(cc, x, y, z) \
36 (RBIMPL_COMPILER_IS(cc) && \
37 ((RBIMPL_COMPILER_VERSION_MAJOR > (x)) || \
38 ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
39 ((RBIMPL_COMPILER_VERSION_MINOR > (y)) || \
40 ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
41 (RBIMPL_COMPILER_VERSION_PATCH >= (z)))))))
42
53#define RBIMPL_COMPILER_BEFORE(cc, x, y, z) \
54 (RBIMPL_COMPILER_IS(cc) && \
55 ((RBIMPL_COMPILER_VERSION_MAJOR < (x)) || \
56 ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
57 ((RBIMPL_COMPILER_VERSION_MINOR < (y)) || \
58 ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
59 (RBIMPL_COMPILER_VERSION_PATCH < (z)))))))
60
61#endif /* RBIMPL_COMPILER_SINCE_H */
compiler_is.h
Defines RBIMPL_COMPILER_IS.