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

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

Re: [avr-gcc-list] Problem allocating memory in xflash


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Problem allocating memory in xflash
Date: Thu, 27 Aug 2009 18:24:41 +0200 (MET DST)

Jan Waclawek <address@hidden> wrote:

>>Sure, it depends from sizeof(int).

> Hummm, for me, the relationship is not quite "sure". Can you explain
> that in more detail, please?

An array is implicitly (without the option to change it) indexed by
type `int'.  Not `unsigned int', it's `int' -- because negative
indices are explicitly allowed (e.g. to access the previous array
element through a pointer like "a[-1]").

I'm not quite sure why GCC doesn't accept more than __INT_MAX__
*bytes* (as opposed to array elements); perhaps it internally aliases
everything to bytes.

-- 
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]