On Wed, 1 Mar 2023 16:07:14 -0800
Steve Kargl wrote:
> On Wed, Mar 01, 2023 at 10:28:56PM +0100, Bernhard Reutner-Fischer via
> Fortran wrote:
> > libgfortran/caf/single.c |6 ++
> > libgfortran/io/async.c |6 ++
> > libgfortran/io/format.c |3 +--
> >
On Fri, Mar 3, 2023 at 10:14 PM Jerry D via Fortran wrote:
> I am certainly not a C++ expert but it seems to me this all begs for
> automatic finalization where one would not have to invoke free at all.
> I suspect the gfortran frontend is not designed for such things.
+1 for RAII
On 3/4/23, Janne Blomqvist via Gcc-patches wrote:
> On Wed, Mar 1, 2023 at 11:31 PM Bernhard Reutner-Fischer via Fortran
> wrote:
>>
>> Hi!
>>
>> Mere cosmetics.
>>
>> - if (foo != NULL)
>> free (foo);
>>
>> With the caveat that coccinelle ruins replacement whitespace or i'm
>> uneducated
Hi Bernhard!
On 2023-03-01T22:28:56+0100, Bernhard Reutner-Fischer via Gcc-patches
wrote:
> // POSIX: free(NULL) is perfectly valid
> // quote: If ptr is a null pointer, no action shall occur.
> @ rule1 @
> expression e;
> @@
>
> - if (e != NULL)
> - { free(e); }
> + free (e);
Nice,
On Wed, Mar 1, 2023 at 11:31 PM Bernhard Reutner-Fischer via Fortran
wrote:
>
> Hi!
>
> Mere cosmetics.
>
> - if (foo != NULL)
> free (foo);
>
> With the caveat that coccinelle ruins replacement whitespace or i'm
> uneducated enough to be unable to _not_ run the diff through
> sed -e
On 3/3/23 3:32 PM, Iain Sandoe wrote:
On 3 Mar 2023, at 23:11, Bernhard Reutner-Fischer via Fortran
wrote:
On 2 March 2023 02:23:10 CET, Jerry D wrote:
On 3/1/23 4:07 PM, Steve Kargl via Fortran wrote:
On Wed, Mar 01, 2023 at 10:28:56PM +0100, Bernhard Reutner-Fischer via Fortran
> On 3 Mar 2023, at 23:11, Bernhard Reutner-Fischer via Fortran
> wrote:
>
> On 2 March 2023 02:23:10 CET, Jerry D wrote:
>> On 3/1/23 4:07 PM, Steve Kargl via Fortran wrote:
>>> On Wed, Mar 01, 2023 at 10:28:56PM +0100, Bernhard Reutner-Fischer via
>>> Fortran wrote:
On 2 March 2023 02:23:10 CET, Jerry D wrote:
>On 3/1/23 4:07 PM, Steve Kargl via Fortran wrote:
>> On Wed, Mar 01, 2023 at 10:28:56PM +0100, Bernhard Reutner-Fischer via
>> Fortran wrote:
>>> libgfortran/caf/single.c |6 ++
>>> libgfortran/io/async.c |6 ++
>>>
Bernhard Reutner-Fischer writes:
> libgo/runtime/go-setenv.c|6 ++
> libgo/runtime/go-unsetenv.c |3 +--
Files in the libgo directory are mirrored from upstream sources, as
described in libgo/README.gcc. Please don't change them in the gcc
repository. Thanks.
Ian
On 3/1/23 4:07 PM, Steve Kargl via Fortran wrote:
On Wed, Mar 01, 2023 at 10:28:56PM +0100, Bernhard Reutner-Fischer via Fortran
wrote:
libgfortran/caf/single.c |6 ++
libgfortran/io/async.c |6 ++
libgfortran/io/format.c |3 +--
On Wed, Mar 1, 2023 at 3:52 PM Bernhard Reutner-Fischer
wrote:
>
> On Wed, 1 Mar 2023 14:59:44 -0800
> Andrew Pinski wrote:
>
> > On Wed, Mar 1, 2023 at 1:31 PM Bernhard Reutner-Fischer via Fortran
> > wrote:
> > >
> > > Hi!
> > >
> > > Mere cosmetics.
> > >
> > > - if (foo != NULL)
> > >
On Wed, Mar 01, 2023 at 10:28:56PM +0100, Bernhard Reutner-Fischer via Fortran
wrote:
> libgfortran/caf/single.c |6 ++
> libgfortran/io/async.c |6 ++
> libgfortran/io/format.c |3 +--
> libgfortran/io/transfer.c|6 ++
> libgfortran/io/unix.c
On Wed, 1 Mar 2023 14:59:44 -0800
Andrew Pinski wrote:
> On Wed, Mar 1, 2023 at 1:31 PM Bernhard Reutner-Fischer via Fortran
> wrote:
> >
> > Hi!
> >
> > Mere cosmetics.
> >
> > - if (foo != NULL)
> > free (foo);
> >
> > With the caveat that coccinelle ruins replacement whitespace or i'm
>
On Wed, Mar 1, 2023 at 1:31 PM Bernhard Reutner-Fischer via Fortran
wrote:
>
> Hi!
>
> Mere cosmetics.
>
> - if (foo != NULL)
> free (foo);
>
> With the caveat that coccinelle ruins replacement whitespace or i'm
> uneducated enough to be unable to _not_ run the diff through
> sed -e
On Wed, 1 Mar 2023 22:58:59 +0100
Bernhard Reutner-Fischer wrote:
> On Wed, 1 Mar 2023 22:28:56 +0100
> Bernhard Reutner-Fischer wrote:
>
> > Remarks:
> > 1) We should do this in if-conversion (?) on our own.
> >I suppose. Independently of -fdelete-null-pointer-checks
>
> and iff we can
On Wed, 1 Mar 2023 22:28:56 +0100
Bernhard Reutner-Fischer wrote:
> Remarks:
> 1) We should do this in if-conversion (?) on our own.
>I suppose. Independently of -fdelete-null-pointer-checks
and iff we can prove that ptr was NULL when passed to free(ptr) then we
can elide the call, of
Hi!
Mere cosmetics.
- if (foo != NULL)
free (foo);
With the caveat that coccinelle ruins replacement whitespace or i'm
uneducated enough to be unable to _not_ run the diff through
sed -e 's/^+\([[:space:]]*\)free(/+\1free (/'
at least. If anybody knows how to improve replacement
17 matches
Mail list logo