This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: double and float in GCC


On Thu, Jun 23, 2016 at 02:03:38AM -0700, Kondi wrote:
> I built GCC toolchain for my custom CPU. My custom CPU have 32-bits floating
> point unit so I set DOUBLE_TYPE_SIZE 32, to prevent convertion from float to
> double. Additionally in newlib I define _DOUBLE_IS_32BITS. 
> When I ran the GCC test, buildin-math-4.c fails and exactly:
>  
> if (sizeof(int)*__CHAR_BIT__ <= __DBL_MANT_DIG__) {

> The IF condition is met,

Assuming your ints are 32 bits (and your __CHAR_BIT__ is 8), this means
your __DBL_MANT_DIG__ is bigger than 32.  That's not consistent.


Segher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]