https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88814

Dávid Bolvanský <david.bolvansky at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david.bolvansky at gmail dot 
com

--- Comment #2 from Dávid Bolvanský <david.bolvansky at gmail dot com> ---
You cannot [0] do this general transformation..

Runtime variable n = 10.

d[9] = 'A';
snprintf(d, n, "%s", s) // s is "str"
assert(d[9] == 'A');
=>
d[9] = 'A';
memccpy(d, s, 0, 9);
d[9] = 0;
assert(d[9] == 'A');

[0] https://reviews.llvm.org/D67986

Reply via email to