This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RTEMS patch sweep: *types.h

On Tue, 2005-02-22 at 04:12 -0500, Paul Schlie wrote:
> Nice, might also be helpful to define a s/u int type and corresponding
> min/max limits which is known to be the size of a pointer;
Do you mean intptr_t and uintptr_t?

These are to come as part of one of my next patches ;-)

>  which is
> typically convenient to know when declaring array indexes, etc, which
> although not a pointer itself, should likely be practically bounded by
> the natural size of the target's potentially addressable memory. (as
> unfortunately the size of an int may not be equivalent to the size of
> a pointer, although typically is, but most ignore how large it may
> actually be)
> Thereby one can conditionally declare explicitly sized data types; and/or
> a type known to be the same size of a pointer when correspondingly required.
> Lastly, although not a type per-se, wonder if it might be useful to formally
> specify a target defined memory_limit value, that may be utilized by code to
> determine the likely type-sizes, and/or data structure sizes it may have
> some flexibility in defining by default (for example, an algorithm which may
> require a hash table, may define a small one, with correspondingly smaller
> variable types for a target which has defined a small memory_limit, vs. a
> larger one. (maybe to keep it simple, a small, medium, large enumeration
> value would be sufficient)?
I didn't think about this yet.

The original motivation behind these patches (and further patches to
come) was implementing a portable stdint.h and inttypes.h (Scheduled to
come soon, should these patches be accepted)

It gradually had evolved into a partial cleanup of fixed-size in RTEMS
and newlib with regard to SUSv3 and BSD :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]