On 12 February 2016 at 15:54, Sebastian Huber <sebastian.huber@xxxxxxxxxxxxxxxxxx> wrote: > Yes, this is the easy part. However, the expand_builtin_memset_args() in builtins.c doesn't look so easy to me. I really have no idea how to tell GCC that it should stop to optimize this particular memset() variant away. This is why I asked for the memset_s(). I would suggest to ask in gcc@. There might be other builtins that have similar semantics. Cheers, Manuel.