Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-04-30 Thread David Edelsohn via Gcc-patches
On Fri, Apr 30, 2021 at 3:31 PM Jonathan Wakely wrote: > > On 29/04/21 16:06 -0400, David Edelsohn wrote: > >On Fri, Jan 8, 2021 at 1:37 PM Jonathan Wakely wrote: > >> > >> On 06/01/21 19:41 -0500, David Edelsohn wrote: > >> >Thanks for clarifying the issue. > >> > > >> >As you implicitly point o

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-04-30 Thread Jonathan Wakely via Gcc-patches
On 29/04/21 16:06 -0400, David Edelsohn wrote: On Fri, Jan 8, 2021 at 1:37 PM Jonathan Wakely wrote: On 06/01/21 19:41 -0500, David Edelsohn wrote: >Thanks for clarifying the issue. > >As you implicitly point out, GCC knows the type of INT64 and defines >the macro __INT64_TYPE__ . The revised

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-04-29 Thread Jonathan Wakely via Gcc-patches
On 29/04/21 16:06 -0400, David Edelsohn wrote: On Fri, Jan 8, 2021 at 1:37 PM Jonathan Wakely wrote: On 06/01/21 19:41 -0500, David Edelsohn wrote: >Thanks for clarifying the issue. > >As you implicitly point out, GCC knows the type of INT64 and defines >the macro __INT64_TYPE__ . The revised

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-04-29 Thread David Edelsohn via Gcc-patches
On Fri, Jan 8, 2021 at 1:37 PM Jonathan Wakely wrote: > > On 06/01/21 19:41 -0500, David Edelsohn wrote: > >Thanks for clarifying the issue. > > > >As you implicitly point out, GCC knows the type of INT64 and defines > >the macro __INT64_TYPE__ . The revised code can use that directly, > >such as

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-08 Thread David Edelsohn via Gcc-patches
On Fri, Jan 8, 2021 at 1:52 PM Jakub Jelinek wrote: > > On Fri, Jan 08, 2021 at 06:37:03PM +, 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 wher

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-08 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 08, 2021 at 06:37:03PM +, 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'

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-08 Thread Jonathan Wakely via Gcc-patches
On 06/01/21 19:41 -0500, David Edelsohn wrote: Thanks for clarifying the issue. As you implicitly point out, GCC knows the type of INT64 and defines the macro __INT64_TYPE__ . The revised code can use that directly, such as: #if defined(_GLIBCXX_HAVE_INT64_T_LONG) \ || defined(_GLIBCXX_HAVE

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-06 Thread David Edelsohn via Gcc-patches
Thanks for clarifying the issue. As you implicitly point out, GCC knows the type of INT64 and defines the macro __INT64_TYPE__ . The revised code can use that directly, such as: #if defined(_GLIBCXX_HAVE_INT64_T_LONG) \ || defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG) typedef __INT64_TYPE__

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-06 Thread Jakub Jelinek via Gcc-patches
On Thu, Jan 07, 2021 at 12:39:39AM +0100, Jakub Jelinek wrote: > We are talking past each other. > > Consider an OS that has in stdint.h > typedef long long int64_t; And, from grepping INT64_TYPE in config/* config/*/* it isn't just theoretic, Darwin and OpenBSD behave that way. Jakub

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-06 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 06, 2021 at 06:01:23PM -0500, David Edelsohn wrote: > You continue to not respond to the actual patch and to raise issues > that don't exist in the actual patch. We are talking past each other. Consider an OS that has in stdint.h typedef long long int64_t; supports 32-bit and 64-bit m

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-06 Thread David Edelsohn via Gcc-patches
On Wed, Jan 6, 2021 at 4:42 PM Jakub Jelinek wrote: > > On Wed, Jan 06, 2021 at 04:20:22PM -0500, David Edelsohn wrote: > > Your response doesn't correspond to the patch nor to what I described. > > > > Nowhere did I say that int64_t must correspond to "long". The patch > > specifically chooses "

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-06 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 06, 2021 at 04:20:22PM -0500, David Edelsohn wrote: > Your response doesn't correspond to the patch nor to what I described. > > Nowhere did I say that int64_t must correspond to "long". The patch > specifically chooses "long" or "long long" based on the > __SIZEOF_LONG__ *and* __SIZE

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-06 Thread David Edelsohn via Gcc-patches
On Wed, Jan 6, 2021 at 2:37 PM Jakub Jelinek wrote: > > On Wed, Jan 06, 2021 at 01:38:25PM -0500, David Edelsohn via Gcc-patches > wrote: > > Is this an acceptable solution to determine the value at compile-time? > > This looks wrong to me. The fact that long is 64-bit doesn't imply that > int64

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-06 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 06, 2021 at 01:38:25PM -0500, David Edelsohn via Gcc-patches wrote: > Is this an acceptable solution to determine the value at compile-time? This looks wrong to me. The fact that long is 64-bit doesn't imply that int64_t as defined by stdint.h must be long, it could be long long too.

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-06 Thread David Edelsohn via Gcc-patches
On Wed, Jan 6, 2021 at 1:55 PM Marc Glisse wrote: > > On Wed, 6 Jan 2021, David Edelsohn via Gcc-patches wrote: > > > Currently the type of streamoff is determined at libstdc++ configure > > time, chosen by the definitions of _GLIBCXX_HAVE_INT64_T_LONG and > > _GLIBCXX_HAVE_INT64_T_LONG_LONG. For

Re: [PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-06 Thread Marc Glisse
On Wed, 6 Jan 2021, David Edelsohn via Gcc-patches wrote: Currently the type of streamoff is determined at libstdc++ configure time, chosen by the definitions of _GLIBCXX_HAVE_INT64_T_LONG and _GLIBCXX_HAVE_INT64_T_LONG_LONG. For a multilib configuration, the difference is encoded in the differ

[PATCH, libstdc++] GLIBCXX_HAVE_INT64_T

2021-01-06 Thread David Edelsohn via Gcc-patches
Use __SIZEOF_LONG__ and __SIZEOF_LONG_LONG__ to determine the type of streamoff at compile time instead of _GLIBCXX_HAVE_INT64_T_LONG and _GLIBCXX_HAVE_INT64_T_LONG_LONG. Currently the type of streamoff is determined at libstdc++ configure time, chosen by the definitions of _GLIBCXX_HAVE_INT64_T_L