Ruby: include/ruby/internal/compiler_is/gcc.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

gcc.h
1#ifndef RBIMPL_COMPILER_IS_GCC_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_COMPILER_IS_GCC_H
22#include "ruby/internal/compiler_is/apple.h"
23#include "ruby/internal/compiler_is/clang.h"
24#include "ruby/internal/compiler_is/intel.h"
25
26#if ! defined(__GNUC__)
27# define RBIMPL_COMPILER_IS_GCC 0
28
29#elif RBIMPL_COMPILER_IS(Apple)
30# define RBIMPL_COMPILER_IS_GCC 0
31
32#elif RBIMPL_COMPILER_IS(Clang)
33# define RBIMPL_COMPILER_IS_GCC 0
34
35#elif RBIMPL_COMPILER_IS(Intel)
36# define RBIMPL_COMPILER_IS_GCC 0
37
38#else
39# define RBIMPL_COMPILER_IS_GCC 1
40# define RBIMPL_COMPILER_VERSION_MAJOR __GNUC__
41# define RBIMPL_COMPILER_VERSION_MINOR __GNUC_MINOR__
42# define RBIMPL_COMPILER_VERSION_PATCH __GNUC_PATCHLEVEL__
43#endif
44
45#endif /* RBIMPL_COMPILER_IS_GCC_H */