[Bug c/81141] missing warning using sizeof a/sizeof *a with a zero-length array

2021-08-13 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81141 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug c/81141] missing warning using sizeof a/sizeof *a with a zero-length array

2019-02-10 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81141 --- Comment #5 from Eric Gallager --- (In reply to Martin Sebor from comment #4) > (In reply to comment #3) > > What I meant to say is: See also bug 81141 for a related request (limited to > strncpy). The patch submitted there issues a warning

[Bug c/81141] missing warning using sizeof a/sizeof *a with a zero-length array

2017-08-20 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81141 --- Comment #4 from Martin Sebor --- (In reply to comment #3) What I meant to say is: See also bug 81141 for a related request (limited to strncpy). The patch submitted there issues a warning for a small subset of the problem (strncpy) but

[Bug c/81141] missing warning using sizeof a/sizeof *a with a zero-length array

2017-08-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81141 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c/81141] missing warning using sizeof a/sizeof *a with a zero-length array

2017-08-01 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81141 Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c/81141] missing warning using sizeof a/sizeof *a with a zero-length array

2017-06-20 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81141 --- Comment #1 from Martin Sebor --- On second thought, the zero-length array misuses aren't limited to the (sizeof P / sizeof *P) pattern. When the type of *P is one byte wide they extend even to sizeof P. For example, the following call to