This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Option to print word size, alignment on the target platform
On 1/25/06, Paul Brook <paul@codesourcery.com> wrote:
> Autoconf already has tests for things like this. Something along the lines of:
>
> const char D_P_S_4[sizeof(void *) == 4 : -1 : 1];
> const char D_P_S_8[sizeof(void *) == 8 : -1 : 1];
>
> Then see which compiles, or grep the error messages.
Right, but are there any way to learn about endianess of the paltform
or the direction of stack growth just from knowing that program
compiles or not? GCC nows about this and it would be nice if there is
a way to expose these.
Regards, Igor