On Tue, 10 Sep 2019, Christian Franke wrote:

AFAICS most of the *printf() and *scanf() inline wrappers are not (or no longer) needed. Prototypes with __asm__() could be used instead.

This patch removes a subset of these functions. As a side effect, It also fixes a regression introduced by my _FORTIFY_SOURCE patch.

Hmm, the patch seems to be mixing quite a few different changes, making it pretty hard to get a grasp of exactly what it does and why.

Is it possible to split it up into a series of incremental, small atomic changes with a verbose commit message, and a note on each of them what it achieves (avoids bug in compiler X, preparation for later patch, etc)

E.g. this:

1. Convert plain inline functions to use __MINGW_ASM_CALL where trivial (e.g. printf, fprintf, vprintf, vfprintf). What does this achieve? Reducing the general code bloat (which certainly is a good thing in itself) or does it interact with the inline soup in some other way as well?

2. Convert inline functions with fortify guards into "#if __MINGW_FORTIFY_LEVEL > 0; (exact same inline function but without ifdefs within the function body); #else __MINGW_ASM_CALL #endif". This would ideally be done without any other changes at all (no adding of extra __restrict__ in parameter lists, no changes from __mingw_bos_ovr to __mingw_bos_extern_ovr)

3. Adding extra __restrict__ in parameter lists for consistency

4 and onwards - All other tweaks (changing __mingw_bos_ovr to __mingw_bos_extern_ovr in some places, adding extern to __mingw_va_arg_pack_ovr, etc) which, as far as I understand, achieve the final effect that was desired. Comments here on each of them about what the bug was and why the tweak gets rid of it would be good for understanding for others that need to dig into it.

// Martin



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to