On Mon, 16 Nov 2009, Vaclav Peroutka wrote:

>
>> Noticed this when porting code from an AVR platform (using gcc-avr) - it's
>> not drastically important, as I've just renamed 'data' in my code to
>> something else which then compiles and works fine, but FYI...
>>
>> Thanks,
>>
>> Gordon
>>
>
> Yes, it is used for data memory ( and "code" for code memory) in case 
> you use pointers, arrays etc.

OK. That makes sense (and I already use __code to stuff other data in 
flash)

> BTW: I personally prefer variable names which are more descriptive, for 
> example "char_to_send" or "rotation_angle". I never had any problem to 
> get confused (either compiler or myself).

Sure - but in that case it was arbitary binary data pertinent to the 
function/file in question.. It was actually code to write 'data' to eeprom 
- as in:

   void eepromWrite (uint16_t addr, uint8_t data)
   ...

s/data/value/

and it was fine.

Gordon

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to