[cfe-dev] Security fail (memset being optimized away)

myLC@gmx.de via cfe-dev cfe-dev at lists.llvm.org
Fri Jan 4 06:37:42 PST 2019


On 1/4/19 12:13 PM, Mehdi AMINI wrote:
> If I understand correctly what you're looking for, this should be relevant:
> https://github.com/google/benchmark/blob/master/include/benchmark/benchmark.h#L309-L312

This is C++ code (my example also works with C) and it uses the usual #ifdef
tree, if I see that correctly. That is, it's not ONE piece of portable code,
but lots of pieces for each different compiler/OS (which I wanted to avoid).




More information about the cfe-dev mailing list