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

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

Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect
Date: Tue, 10 Jan 2012 21:10:17 +0100 (MET)

"Paul McClean" <address@hidden> wrote:

> I recently discovered that the int32_t and uint32_t typedefs in stdint.h
> are incorrect (at least on my target - AT90CAN128).

address@hidden 173% cat > sizeof.c
#include <stdint.h>

unsigned int sizeof_uint32_t(void)
{
  return sizeof(uint32_t);
}

unsigned int sizeof_int32_t(void)
{
  return sizeof(int32_t);
}
^D
address@hidden 174% avr-gcc -mmcu=at90can128 -Os -S sizeof.c
address@hidden 175% cat sizeof.s
        .file   "sizeof.c"
....
sizeof_uint32_t:
/* prologue: function */
/* frame size = 0 */
/* stack size = 0 */
..L__stack_usage = 0
        ldi r24,lo8(4)
        ldi r25,hi8(4)
/* epilogue start */
        ret
        .size   sizeof_uint32_t, .-sizeof_uint32_t
..global sizeof_int32_t
        .type   sizeof_int32_t, @function
sizeof_int32_t:
/* prologue: function */
/* frame size = 0 */
/* stack size = 0 */
..L__stack_usage = 0
        ldi r24,lo8(4)
        ldi r25,hi8(4)
/* epilogue start */
        ret
        .size   sizeof_int32_t, .-sizeof_int32_t

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

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