[Top][All Lists]
[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: |
Paul McClean |
Subject: |
Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect |
Date: |
Wed, 11 Jan 2012 00:44:49 -0000 |
Thanks Stefan for your quick response. It seems I was a little off the
mark :)
I had just ignored what I now understand to be some GCC magic for type
sizes (as had my static analysis tool, which found the problem).
Can anyone explain why the GCC instructions are used in place of the
typical definition?
Could it be expressed as:
unsigned long __attribute__ ((__mode__ (__SI__)))
with both the standard C part and the GCC part indicating the same size?
(This would keep my static analysis tool happy).
Paul
-----Original Message-----
From: Stefan Ernst [mailto:address@hidden
Sent: 10 January 2012 19:28
To: Paul McClean
Cc: address@hidden
Subject: Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are
incorrect
> However lines 125 and 126 define int32_t and uint32_t as signed
> int and unsigned int respectively.
What about the rest of that lines?
unsigned int -> 16 bit
unsigned int __attribute__ ((__mode__ (__SI__))) -> 32 bit
> I have confirmed the sizes of the basic types on my system:
> sizeof(long) = 4
> sizeof(unsigned long) = 4
> sizeof(int) = 2
> sizeof(unsigned int) = 2
And you haven't simply tested "sizeof(uint32_t)"?
--
Stefan
--
Asylia ExchangeDefender Message Security: Click below to verify authenticity
http://www.exchangedefender.com/verify.asp?id=q0B0ipJA022508&address@hidden
- [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect, Paul McClean, 2012/01/10
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect, Stefan Ernst, 2012/01/10
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect,
Paul McClean <=
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect, Joerg Wunsch, 2012/01/11
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect, David Brown, 2012/01/11
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect, Georg-Johann Lay, 2012/01/11
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect, Joerg Wunsch, 2012/01/11
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect, Paul McClean, 2012/01/11
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect, Volker Kuhlmann, 2012/01/12
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs areincorrect, Weddington, Eric, 2012/01/12
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect, Georg-Johann Lay, 2012/01/11
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs are incorrect, Joerg Wunsch, 2012/01/11
- Re: [avr-gcc-list] AVR Libc int32_t and uint32_t typedefs areincorrect, Weddington, Eric, 2012/01/11