[Top][All Lists]

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

Re: [avr-libc-dev] sfr_defs.h and -mint8

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] sfr_defs.h and -mint8
Date: Tue, 7 Oct 2003 22:27:43 +0200
User-agent: Mutt/1.2.5i

As Theodore A. Roth wrote:

> > The question is where and when to include <inttypes.h>. It might
> > be better included in <io.h>, however I'd prefer including it in
> > <sfr_defs.h> when __ASSEMBLER__ is not defined. I believe it makes
> > no harm.

> I don't see any better place to include it. I think I agree that it
> should only be included when __ASSEMBLER__ is not defined since C
> types don't make much sense in assembler code.

The only other option I'd see is to avoid <inttypes.h> alltogether,
and invent private types (like __reg8 and __reg16) inside <avr/io.h>,
using a similar logic as is used in <inttypes.h>.  This avoids
dragging in a header file that is not requested by the user, at the
cost of bloating other (but implementation-internal) types instead.

I have no idea whether the standard would allow that a luser invented
their own uint16_t definitions (when not including <inttypes.h>), that
could become a show-stopper for an implicit inclusion of <inttypes.h>
by a library header.  Other than that, I have no strong opinions
either way.

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]