This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: primitive type size
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Onorato Vaticone <onorato dot vaticone at gmail dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 5 Oct 2017 23:28:33 +0100
- Subject: Re: primitive type size
- Authentication-results: sourceware.org; auth=none
- References: <CAO3yJHZ-SgYgV6G8H1k0+QZE70vdCB3HU7eMX9LYfXFicwoN+g@mail.gmail.com>
On 5 October 2017 at 22:31, Onorato Vaticone wrote:
> Hi all,
>
> I have a question I hope you can help to clarify.
>
> Context: I know Unix/*Linux uses the data model LP64.
> http://www.unix.org/version2/whatsnew/lp64_wp.html
For 64-bit, yes, but ILP32 for 32-bit.
> I'd like to know if gcc uses the data model information of the underlying
> OS to decide the size of the primitive type since the C++ standard does not
> dictate any size.
The type sizes used by the OS are dictated by the psABI document for
the processor. GCC follows the relevant psABI for the target.