Ruby  3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
Macros
compilers.h File Reference

(b76ad15ed0da636161de0243c547ee1e6fc95681)

Internal header absorbing C compiler differences. More...

#include "ruby/internal/compiler_since.h"
#include "ruby/internal/has/attribute.h"
#include "ruby/internal/has/builtin.h"
#include "ruby/internal/has/c_attribute.h"
#include "ruby/internal/has/declspec_attribute.h"
#include "ruby/internal/has/extension.h"
#include "ruby/internal/has/feature.h"
#include "ruby/internal/has/warning.h"
#include "ruby/backward/2/gcc_version_since.h"
Include dependency graph for compilers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MSC_VERSION_SINCE(_)   RBIMPL_COMPILER_SINCE(MSVC, (_) / 100, (_) % 100, 0)
 
#define MSC_VERSION_BEFORE(_)   RBIMPL_COMPILER_BEFORE(MSVC, (_) / 100, (_) % 100, 0)
 
#define MAYBE_UNUSED(x)   x
 
#define WARN_UNUSED_RESULT(x)   x
 
#define RB_OBJ_BUILTIN_TYPE(obj)   rb_obj_builtin_type(obj)
 
#define OBJ_BUILTIN_TYPE(obj)   RB_OBJ_BUILTIN_TYPE(obj)
 
#define rb_obj_builtin_type(obj)
 
#define FLEX_ARY_LEN   /* VALUE ary[]; */
 
#define BITFIELD(type, name, size)   type name : size
 

Detailed Description

Internal header absorbing C compiler differences.

Author
Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org

Definition in file compilers.h.

Macro Definition Documentation

◆ BITFIELD

#define BITFIELD (   type,
  name,
  size 
)    type name : size

Definition at line 103 of file compilers.h.

◆ FLEX_ARY_LEN

#define FLEX_ARY_LEN   /* VALUE ary[]; */

Definition at line 88 of file compilers.h.

◆ MAYBE_UNUSED

#define MAYBE_UNUSED (   x)    x

Definition at line 60 of file compilers.h.

◆ MSC_VERSION_BEFORE

#define MSC_VERSION_BEFORE (   _)    RBIMPL_COMPILER_BEFORE(MSVC, (_) / 100, (_) % 100, 0)

Definition at line 23 of file compilers.h.

◆ MSC_VERSION_SINCE

#define MSC_VERSION_SINCE (   _)    RBIMPL_COMPILER_SINCE(MSVC, (_) / 100, (_) % 100, 0)

Definition at line 22 of file compilers.h.

◆ OBJ_BUILTIN_TYPE

#define OBJ_BUILTIN_TYPE (   obj)    RB_OBJ_BUILTIN_TYPE(obj)

Definition at line 68 of file compilers.h.

◆ RB_OBJ_BUILTIN_TYPE

#define RB_OBJ_BUILTIN_TYPE (   obj)    rb_obj_builtin_type(obj)

Definition at line 67 of file compilers.h.

◆ rb_obj_builtin_type

#define rb_obj_builtin_type (   obj)
Value:
__extension__({ \
VALUE arg_obj = (obj); \
RB_SPECIAL_CONST_P(arg_obj) ? -1 : \
(int)RB_BUILTIN_TYPE(arg_obj); \
})

Definition at line 70 of file compilers.h.

◆ WARN_UNUSED_RESULT

#define WARN_UNUSED_RESULT (   x)    x

Definition at line 64 of file compilers.h.