On 2017-04-06 17:12:22 +0200, Niels Möller wrote:
> I don't really know how that magic works, but my guess guess is that
> it's per compilation unit, so "printf" in the source code will refer to
> one of two different functions depending on which magic preprocessor
> symbols were defined when stdio.h was parsed. (Which then might violate
> C standard rules on function pointer comparison...)
One can look at the preprocessor output. :-)
Without -D__USE_MINGW_ANSI_STDIO:
int __attribute__((__cdecl__)) printf(const char * __restrict__ _Format,...);
With -D__USE_MINGW_ANSI_STDIO:
static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__))
__attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1)))
int printf (const char *__format, ...)
{
register int __retval;
__builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
__retval = __mingw_vprintf( __format, __local_argv );
__builtin_va_end( __local_argv );
return __retval;
}
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
_______________________________________________
gmp-bugs mailing list
[email protected]
https://gmplib.org/mailman/listinfo/gmp-bugs