Martin Storsjö wrote:
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?


Meantime I learned why these static(!) inline functions are needed:
If a compiler builtin with __attribute__((format(ms_printf(...))) exists, a 'extern' prototype or 'extern inline' function cannot change this to __attribute__((format(gnu_printf(...))). A 'static inline' function required then. This is the case for most *printf() functions.

So let's forget this patch :-)



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

Reply via email to