GCC Middle and Back End API Reference
format_helper Class Reference

#include <real.h>

Collaboration diagram for format_helper:

Public Member Functions

 format_helper (const real_format *format)
 
template<typename T >
 format_helper (const T &)
 
const real_formatoperator-> () const
 
 operator const real_format * () const
 
bool decimal_p () const
 
bool can_represent_integral_type_p (tree type) const
 

Private Attributes

const real_formatm_format
 

Detailed Description

This class allows functions in this file to accept a floating-point
format as either a mode or an explicit real_format pointer.  In the
former case the mode must be VOIDmode (which means "no particular
format") or must satisfy SCALAR_FLOAT_MODE_P.   

Constructor & Destructor Documentation

◆ format_helper() [1/2]

format_helper::format_helper ( const real_format * format)
inline

◆ format_helper() [2/2]

template<typename T >
format_helper::format_helper ( const T & m)
inline

Member Function Documentation

◆ can_represent_integral_type_p()

bool format_helper::can_represent_integral_type_p ( tree type) const
True if all values of integral type can be represented
by this floating-point type exactly.   

References decimal_p(), gcc_assert, INTEGRAL_TYPE_P, SIGNED, significand_size(), TYPE_PRECISION, and TYPE_SIGN.

◆ decimal_p()

bool format_helper::decimal_p ( ) const
inline

References real_format::b, and m_format.

Referenced by can_represent_integral_type_p().

◆ operator const real_format *()

format_helper::operator const real_format * ( ) const
inline

References m_format.

◆ operator->()

const real_format * format_helper::operator-> ( ) const
inline

References m_format.

Field Documentation

◆ m_format

const real_format* format_helper::m_format
private

The documentation for this class was generated from the following files: