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

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

Re: [avr-gcc-list] Int32 Support


From: Dave Hylands
Subject: Re: [avr-gcc-list] Int32 Support
Date: Mon, 18 Sep 2006 14:30:35 -0700

Hi Tomdean,

int main() {
 uint8_t  z = sizeof(uint32_t);
 uint32_t a = (uint32_t)1<<14;
 uint32_t b = (uint32_t)1<<15;
 uint32_t c = (uint32_t)1<<16;
 return -1;
}

Produces the results you want.

Yeah.

On the AVR,
1 is an int, and is typically 16 bits wide (unless you use the -mint8 flag)
1U is an unsigned int
1L is a long
1UL is an unsigned long and is typically 32 bits wide.

Similarly, for floating point

1.0 is a double
1.0F is a float

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/




reply via email to

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