[Bug c/71219] Warn about (struct S*)malloc(n) where n < sizeof(struct S)

2024-02-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71219 Sam James changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|---

[Bug c/71219] Warn about (struct S*)malloc(n) where n < sizeof(struct S)

2023-11-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71219 --- Comment #6 from CVS Commits --- The master branch has been updated by Martin Uecker : https://gcc.gnu.org/g:d880e093d92084f55b10626610ef059fd9194a6a commit r14-5059-gd880e093d92084f55b10626610ef059fd9194a6a Author: Martin Uecker Date:

[Bug c/71219] Warn about (struct S*)malloc(n) where n < sizeof(struct S)

2023-09-18 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71219 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #5

[Bug c/71219] Warn about (struct S*)malloc(n) where n < sizeof(struct S)

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71219 Jonathan Wakely changed: What|Removed |Added Last reconfirmed|2016-05-26 00:00:00 |2020-11-10 --- Comment #4 from

[Bug c/71219] Warn about (struct S*)malloc(n) where n < sizeof(struct S)

2016-05-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71219 --- Comment #3 from Jonathan Wakely --- That example is just taken straight from the WG14 document I linked to. Maybe the compiler should also be able to presume that the allocation is intended for struct S1 if you do: struct S1 *p =

[Bug c/71219] Warn about (struct S*)malloc(n) where n < sizeof(struct S)

2016-05-26 Thread nsz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71219 nsz at gcc dot gnu.org changed: What|Removed |Added CC||nsz at gcc dot gnu.org ---

[Bug c/71219] Warn about (struct S*)malloc(n) where n < sizeof(struct S)

2016-05-26 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71219 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|