From: Paul F. <pj...@wa...> - 2024-11-22 07:01:13
|
On 21-11-24 10:48, Florian Krohm wrote: > On 21.11.24 08:34, Paul Floyd wrote: > Yeah, this is annoying. That warning is brought to you by -Ox with x > 0 > In my experience (many years doing static analysis and looking at other > prople's code) I can say that this warning is a weak symptom for > detecting anything serious. How about disabling this globally? Hi Florian I think that the warning is useful but mainly for less experienced developers and to protect against silly mistakes. Also we get relatively little benefit from this since we don't have that much C-with-libc code. If we really want the extra protection in the Valgrind libc replacement functions we should use annotation - either [[nodiscard]] (but that requires a very recent C compiler) or '__wur' and _FORTIFY_SOURCE like in glibc. Anyone else have an opinion on this? A+ Paul |