This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: struct
- From: Maximilian <king at greatfreeworld dot org>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 03 Oct 2018 16:14:49 +0000
- Subject: Re: struct
- References: <1538329498465-0.post@n8.nabble.com> <1538578841915-0.post@n8.nabble.com>
If you want to guarantee a size use the corresponding type.
uint8_t uint16_t uint32_t uint64_t uint128_t
or the signed varients
int8_t int16_t int32_t int64_t int128_t
On Wed, 2018-10-03 at 10:00 -0500, sundaresh wrote:
> Thanks to all of you. The __attribute__ worked but later came to know
> about
> #pragma pack also and tried that and simpler. However I am using
> compile
> option -m32 but I would like long to be 64 bit rather than 32 bit. Is
> using
> long long the only way to go about doing it. What is the best way to
> make
> long a 64 bit irrespective of whether it is compiled for a 32-bit or
> for a
> 64-bit architecture ?
>
>
>
> --
> Sent from: http://gcc.1065356.n8.nabble.com/gcc-Help-f629689.html