This is the mail archive of the gcc-patches@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: Patch for gcc.c-torture/execute/ieee/20010226-1.c


On Mon, Sep 23, 2002 at 07:48:00PM +0530, D.Venkatasubramanian, Noida wrote:
> The other solution,
>    if (sizeof(long double) <= 4 && ((unsigned char)-1) == 255)
>      exit (0);
> 
> would again make it specific, something we are trying to avoid, isn't it ;-)

The correct solution is

  #include <float.h>

  if (LDBL_EPSILON > 0x1p-31L)
    return 0;

since we look at 32 bits of the significand.


r~


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