public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <idsandoe@googlemail.com>
To: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Jerry D <jvdelisle2@gmail.com>,
	sgk@troutmask.apl.washington.edu,
	GCC Fortran <fortran@gcc.gnu.org>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Ian Lance Taylor <ian@airs.com>,
	Arnaud Charlet <charlet@adacore.com>
Subject: Re: [PATCH][stage1] Remove conditionals around free()
Date: Fri, 3 Mar 2023 23:32:56 +0000	[thread overview]
Message-ID: <DCD07798-52C7-4E86-A312-756C0BA98122@googlemail.com> (raw)
In-Reply-To: <30E6853A-2633-4483-A2B5-8691C7AD9F95@gmail.com>



> On 3 Mar 2023, at 23:11, Bernhard Reutner-Fischer via Fortran <fortran@gcc.gnu.org> wrote:
> 
> On 2 March 2023 02:23:10 CET, Jerry D <jvdelisle2@gmail.com> 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 ++----
>>>>  libgfortran/io/format.c      |    3 +--
>>>>  libgfortran/io/transfer.c    |    6 ++----
>>>>  libgfortran/io/unix.c        |    3 +--
>>> 
>>> The Fortran ones are OK.
>>> 
>> 
>> The only question I have: Is free posix compliant on all platforms?
>> 
>> For example ming64 or mac?

OSX / macOS are [certified] Posix compliant - but to unix03 (and might be missing features declared as optional at that revision, or features from later Posix versions).

In the case of free() man says:
"The free() function deallocates the memory allocation pointed to by ptr. If ptr is a NULL pointer, no operation is performed.”

Iain


>>  It seems sometimes we run into things like this once in a while.
> 
> I think we have the -liberty to cater even for non compliant systems either way, if you please excuse the pun. That's not an excuse on POSIX systems, imho.
> 
>> 
>> Otherwise I have no issue at all.  It is a lot cleaner.
>> 
>> Jerry


  reply	other threads:[~2023-03-03 23:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 21:28 Bernhard Reutner-Fischer
2023-03-01 21:58 ` Bernhard Reutner-Fischer
2023-03-01 22:54   ` Bernhard Reutner-Fischer
2023-03-01 22:59 ` Andrew Pinski
2023-03-01 23:52   ` Bernhard Reutner-Fischer
2023-03-02  0:39     ` Andrew Pinski
2023-03-02  0:07 ` Steve Kargl
2023-03-02  1:23   ` Jerry D
2023-03-03 23:11     ` Bernhard Reutner-Fischer
2023-03-03 23:32       ` Iain Sandoe [this message]
2023-03-04  3:14         ` Jerry D
2023-03-24  6:30           ` NightStrike
2023-05-08  6:01   ` Bernhard Reutner-Fischer
2023-03-02  3:23 ` Ian Lance Taylor
2023-03-04 10:15 ` Janne Blomqvist
2023-03-22  7:21   ` Eric Gallager
2023-03-08 21:56 ` Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DCD07798-52C7-4E86-A312-756C0BA98122@googlemail.com \
    --to=idsandoe@googlemail.com \
    --cc=charlet@adacore.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ian@airs.com \
    --cc=jvdelisle2@gmail.com \
    --cc=rep.dot.nop@gmail.com \
    --cc=sgk@troutmask.apl.washington.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).