Yeah it certainly seems like it ought to fail for a C++ standard reason on
both platforms.

I know C is often nominatively typed, so if types have different names,
they are different types. But it is done inconsistently. So this may be an
area of ambiguity, even in the standard.

Bill.


On 8 August 2013 14:06, Brian Gladman <b...@gladman.plus.com> wrote:

> On 08/08/2013 13:43, Bill Hart wrote:
> > On 8 August 2013 12:53, Brian Gladman <b...@gladman.plus.com> wrote:
>
> [snip]
> >> where mpir_ui/si map to long types everywhere except on Windows x64
> >> where they map to long long types.
> >>
> >>> So it comes down to the LP64 vs the LLP64, (long is 32-bit on Win and
> >>> 64-bit on Lin) I guess some macro's to properly deal with the windows
> >> case
> >>> and the bitness of the build are in order.
> >>
> >> I don't understand this - can you elaborate please.
> >
> > He's just referring to the fact that on 64 bit linux long is 64 bits,
> > whereas on Windows it's 32 bits. So he's recommending that we fix the
> > problem with some macros which distinguish whether we are on Windows or
> > not, and whether the machine is 32 bits or 64 bits.
> >
> > I guess we were already doing this, but we got it wrong somewhere.
> > Specifically, you cannot overload a function for intmax_t and long long
> > because they are the same type.
>
> We provide overloads for both signed and unsigned long and long long
> types.   At the moment we also provide overloads for uintmax_t and
> intmax_t types.
>
> Since this overload ought to fail on both Linux (ambiguity with long)
> and Windows x64 (ambiguity with long long) we could simply remove it.
>
> But it doesn't fail on Windows x64 (unless the tests don't detect it) so
> it seems that we can add an _MSC_VER based exclude to fix this. But it
> would be nice to understand why it fails on GCC but not on Visual Studio
> - probably some different algorithm for disambiguation maybe.
>
>    Brian
>
> --
> You received this message because you are subscribed to the Google Groups
> "mpir-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mpir-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to mpir-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/mpir-devel.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to