avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] Program memory macros and -mint8


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] Program memory macros and -mint8
Date: Mon, 11 Nov 2002 16:16:50 +0100
User-agent: Mutt/1.2.5i

As Nils Kristian Strom wrote:

> I have written program memory macros that uses (void*), (char*) etc. to 
> hold the address, which works flawlessly for both -mint8 and 16 bit 
> integers.

I think they should be rewritten using explicit integer sizes instead.
The use of pointers is IMHO OK here, but instead of using char *,
rather use uint8_t *, etc.

Theodore has been proposing something similar for the EEPROM functions
recently.  He also uses explicit integer sizes.

Of course, <inttypes.h> needs my suggested fix applied first.  Any
comments about that one?

> Are there any issues I fail to understand ?

Nope, except what i've been mentioning all the time: it needs a
volunteer to do all this.  avr-libc simply has never been designed
with the idea of using -mint8 in mind, so if you now find -mint8
flaws, most of them are not there intentionally but rather
accidentally.

Of course, -mint8 will always violate the C standard, but if someone
really cares for all the details of it, avr-libc could be probably
made largely compatible with it (and the parts that are incompatible
simply need to be documented then).

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/




reply via email to

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