Re: [PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-19 Thread Joseph Myers
On Mon, 18 Dec 2023, Jakub Jelinek wrote: > Hi! > > The following patch changes -Walloc-size warning to no longer warn > about int *p = calloc (1, sizeof (int));, because as discussed earlier, > the size is IMNSHO sufficient in that case, for alloc_size with 2 > arguments warns if the product of

Re: [PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-19 Thread Martin Uecker
Am Dienstag, dem 19.12.2023 um 12:20 -0500 schrieb Jason Merrill: > On 12/19/23 03:47, Jakub Jelinek wrote: > > On Tue, Dec 19, 2023 at 08:11:11AM +0100, Martin Uecker wrote: > > > Am Montag, dem 18.12.2023 um 20:14 +0100 schrieb Jakub Jelinek: > > > > Hi! > > > > > > > > The following patch

Re: [PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-19 Thread Jason Merrill
On 12/19/23 03:47, Jakub Jelinek wrote: On Tue, Dec 19, 2023 at 08:11:11AM +0100, Martin Uecker wrote: Am Montag, dem 18.12.2023 um 20:14 +0100 schrieb Jakub Jelinek: Hi! The following patch changes -Walloc-size warning to no longer warn about int *p = calloc (1, sizeof (int));, because as

Re: [PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-19 Thread Martin Uecker
Am Dienstag, dem 19.12.2023 um 09:47 +0100 schrieb Jakub Jelinek: > On Tue, Dec 19, 2023 at 08:11:11AM +0100, Martin Uecker wrote: > > Am Montag, dem 18.12.2023 um 20:14 +0100 schrieb Jakub Jelinek: > > > Hi! > > > > > > The following patch changes -Walloc-size warning to no longer warn > > >

Re: [PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-19 Thread Jakub Jelinek
On Tue, Dec 19, 2023 at 08:11:11AM +0100, Martin Uecker wrote: > Am Montag, dem 18.12.2023 um 20:14 +0100 schrieb Jakub Jelinek: > > Hi! > > > > The following patch changes -Walloc-size warning to no longer warn > > about int *p = calloc (1, sizeof (int));, because as discussed earlier, > > the

Re: [PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-18 Thread Martin Uecker
Am Montag, dem 18.12.2023 um 20:14 +0100 schrieb Jakub Jelinek: > Hi! > > The following patch changes -Walloc-size warning to no longer warn > about int *p = calloc (1, sizeof (int));, because as discussed earlier, > the size is IMNSHO sufficient in that case, for alloc_size with 2 > arguments

[PATCH] c: Split -Wcalloc-transposed-args warning from -Walloc-size, -Walloc-size fixes

2023-12-18 Thread Jakub Jelinek
Hi! The following patch changes -Walloc-size warning to no longer warn about int *p = calloc (1, sizeof (int));, because as discussed earlier, the size is IMNSHO sufficient in that case, for alloc_size with 2 arguments warns if the product of the 2 arguments is insufficiently small. Also, it