avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] AVR-GCC question


From: Jeff Epler
Subject: Re: [avr-gcc-list] AVR-GCC question
Date: Mon, 23 May 2005 14:52:40 -0500
User-agent: Mutt/1.4.1i

I understand what you're getting at, but at least one of your problems
can be solved by gcc today.  This works (well, I tested on x86 linux
only) and doesn't seem to require any compiler extensions:
#include <limits.h>
#define MAX_SIGNED(x) (double)((1ull<<(CHAR_BIT * sizeof(x) - 1))-1)

Using this macro, though, the signed char -128 goes to a value below
-1.0.  I think that's the same thing your code did.

Jeff

Attachment: pgpbBdDxGbiEv.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]