Martin Storsjö wrote:
On Fri, 13 Sep 2019, Christian Franke wrote:

...


Ok, now with this patch I see the reason for patch 1/2.

Having to manually disable this on errors doesn't feel ideal

I decided to enable the functions by default as the usage of s*printf() addresses is IMO *very* rare.

We have:
_FORTIFY_SOURCE not set: No error,
-D_FORTIFY_SOURCE[=2]: Error only if s*printf() address is used,
-D_FORTIFY_SOURCE[=2] -D_FORTIFY_VA_ARG=0: No error, but s*printf() not fortified.


- how is this aspect handled in e.g. glibc?

No need to handle this elsewhere because the attribute format(ms_printf,.) vs. format(gnu_printf,.) problem does not exist. In glibc, all these functions are 'extern inline'. GCC allows to use the address then and links to the original non-inline function.

BTW, for Clang, there is no problem, because it still does not support __builtin_va_arg_pack() :-(

Regards,
Christian



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

Reply via email to