[PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

David Edelsohn dje.gcc@gmail.com
Fri Jan 8 20:35:19 GMT 2021


On Fri, Jan 8, 2021 at 1:52 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Fri, Jan 08, 2021 at 06:37:03PM +0000, Jonathan Wakely wrote:
> > This uses __INT64_TYPE__ if that's defined, and long long otherwise. I
> > think that should be equivalent in all practical cases (I can imagine
> > some strange target where __INT64_TYPE__ is defined by the compiler,
> > but int64_t isn't defined when the configure checks look for it, and
> > so the current code would use long long and with my patch would use
> > __INT64_TYPE__ which could be long ... but I think in practice that's
> > unlikely. It was probably more likely in older releases where the
> > configure test would have been done with -std=gnu++98 and so int64_t
> > might not have been declared by libc's <stdint.h>, but if that was the
> > case then any ABI break it caused happened years ago.
>
> Does clang and ICC define __INT64_TYPE__ (at least on most architectures)
> and does it match what gcc defines it to?

Clang (at least back to 3.0.0) and ICC (at least back to 16.0.0)
define __INT64_TYPE__.  If the value is not compatible with the target
__int64_t type (matching GCC), there presumably are deeper problems.

Thanks, David


More information about the Libstdc++ mailing list