My bad, part of Jakub's patch is needed for standards compliance. In gmp-impl.h, we have this:
/* va_copy is standard in C99, and gcc provides __va_copy when in strict C89 mode. Falling back to a memcpy will give maximum portability, since it works no matter whether va_list is a pointer, struct or array. */ #if ! defined (va_copy) && defined (__va_copy) #define va_copy(dst,src) __va_copy(dst,src) #endif #if ! defined (va_copy) #define va_copy(dst,src) \ do { memcpy (&(dst), &(src), sizeof (va_list)); } while (0) #endif We still support ISO C90 (alias ANSI C89) so we cannot just scrap that code. That means that we mustn't call va_end when memcpy was used by means of the code above. I won't put this at the top of my TODO list. Making the GMP code more complex for the sake of standard complience is much less important than making GMP work on existing systems. Is stdarg.h va_end non-empty anywhere? -- Torbjörn Please encrypt, key id 0xC8601622 _______________________________________________ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs