how to get typesizes w/o running binary ?
Ralf Corsepius
rc040203@freenet.de
Thu Nov 23 06:25:00 GMT 2006
On Thu, 2006-11-23 at 00:05 +0100, Enrico Weigelt wrote:
> Hi folks,
>
>
> I'd like to probe typesizes.
> Simply building and running some little test program is trivial.
> But I'd like to do it *without* running an test program.
>
> Does anyone know how I could do this ?
Depends on what you'd need this for.
- Best would be to design your app in such a way that does not depend on
precomputed sizes. Instead, let the compiler compute them at
compile-time or even at run-time.
- If your problem is fixed-size types and if you are using a modern
toolchain, base your design on C99-types (aka. stdint.h)
- If you really need pre-computed sizes, check how autoconf's
AC_CHECK_TYPE macro works or (if your work is using autoconf)
directly use it.
...
Ralf
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list