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

--- Comment #13 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Some more examples to consider (thanks Martin):

   struct MyStrings {
     char a[8], b[20];
   };

   const struct MyStrings ms[] = {
      { "foo", "bar" }, { "abcd", "klmno" }, ...
   };

Consider:

   sprintf (smallbuf, "msg: %s\n", ms[1].b);

vs this case where we don't know which one we're using:

   sprintf (smallbuf, "msg: %s\n", ms[idx].b);

Reply via email to