On 5/25/22 11:19, Martin Sebor wrote:
On 5/25/22 04:49, Richard Biener wrote:
...
[*] For example, no warning is issued for the following overread:

Scratch that, there is no overread with strncpy.  When there is like
with memcpy, it is diagnosed as it should be.


struct A a;

void g (char *d)
{
   struct B *q = &a.b;
  __builtin_strncpy (d, q->a, 123);   // { dg-warning "-Wstringop-overread" "pr???????" { xfail *-*-* } }
}

Reply via email to