Re: _ptr and _srcptr types

2018-05-21 Thread Vincent Lefevre
On 2018-05-22 08:18:18 +0200, Vincent Lefevre wrote: > No, with variadic functions, a null pointer of some type is provided > as an argument, and then the value is re-read as another pointer type > (this is actually a simplification, because depending on the calling > conventions, using incompatibl

Re: _ptr and _srcptr types

2018-05-21 Thread Vincent Lefevre
On 2018-05-22 04:46:50 +0200, Pedro Gimeno wrote: > The C11 standard also says: > > P.47: > > 1. A pointer to void may be converted to or from a pointer to any incomplete > or object type. A pointer to any incomplete or object type may be converted > to a pointer to void and back again; the res

Re: _ptr and _srcptr types

2018-05-21 Thread Pedro Gimeno
Vincent Lefevre wrote, On 2018-05-22 03:13: > On 2018-05-20 22:07:36 +0200, Niels Möller wrote: >> >> If that really is the case, most occurences of NULL or (void*)0 in >> the argument list in the call of a varargs function would be >> undefined behavior, right? > > Using NULL is never guaranteed

Re: _ptr and _srcptr types

2018-05-21 Thread Vincent Lefevre
On 2018-05-20 22:07:36 +0200, Niels Möller wrote: > Vincent Lefevre writes: > > > No, pointers to different types may have different representations, > > and in particular, different sizes. > > Hmm. I was aware that *function* pointers may use different > representation and size than data pointe

Re: mini-gmp mpz_{get,set}_d not fully compatible with GMP

2018-05-21 Thread Torbjörn Granlund
ni...@lysator.liu.se (Niels Möller) writes: I think so. Does current gcc support VAX, or what compiler would we use? vaxpropp$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/lto-wrapper Target: vax--netbsdelf Thread model: posix gcc version 4.8.5 (nb2 20150115) S