From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id 421253858D28; Fri, 3 Mar 2023 23:32:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 421253858D28 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=googlemail.com Received: by mail-wm1-x334.google.com with SMTP id d41-20020a05600c4c2900b003e9e066550fso2130966wmp.4; Fri, 03 Mar 2023 15:32:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; t=1677886378; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TkWbLxVcko8eIirK70mKe+LnLLuAGz/sSqH16A2ffno=; b=ffqDcy8x5y1t8LW0Ilbvo5iMYzGd6ZpJgtoaYb3ZXgVUEMdSTpmfOeUvMMjATdOhWx rG3wIx8+e1B9auRG8DoPkvdtaKgI4RvF3vzuXs1M0S1mLL7Xg0u4YoSqWSeH7gFE7u+B oeVUd/FCVL0+4S87wFWgfwfjJm0Mt8MFJjOLEnRODZu5jkVmU7qZeZBQlkIU2qzIsGlH f4R31nUlE2K50qk00l7sCQGp4MbffIBS96xI768NmYTcYNhDS/lqONhgaxY9e++l7ejA vOPd1xXzS2BBaAPSUqC74P22ySmtlfOWIwL8afJksIs63DUXw9Q/YoXGghWSJfBpMDCJ OqMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677886378; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TkWbLxVcko8eIirK70mKe+LnLLuAGz/sSqH16A2ffno=; b=4P860oWPkttFD/VqqpYg7tBBzKbfeAes1Rt0qnsqq9lWWTNTnk9xQwYMLhwNXmtE/E 2exnSlbE03vu2mYkCT0RR1AuDJinrVo+mNdd3t+qvIzuOEFr7I20CJ7GpTAvVoLnhft7 d/r7YehfXPWZHhHJtoyyIXwoAunMgkeuk64VQZ6IEl5sFnMAI9PwdBMkaIj/kKgIXp1j KjZjGATZW3b34kYJXtqUF+dGlSTWQm6eshKPpR1i/b9//L8mI1vTD6pgr3I2EOeSZm+c Tul2BtAaCjGLX5/b3PR8lQ8vMnT8to3ZzwTY1lkYvGe/6/jrQOAtgV+wtkit1+GGcHC9 wisA== X-Gm-Message-State: AO0yUKXlKBmxMPEzmceH8KG7sainzF/xKIOViosaq/2H2DuHRNWEuTPx cNCOT0aHZIcXwRpP24hvL4E= X-Google-Smtp-Source: AK7set/81/JHLoU3XyI0GcYD2SLOFSYrYFtxLkZE2Uo7F2UsJgWv4AIlQTH+0le4FjKoBhEhRZ89uw== X-Received: by 2002:a05:600c:3d8f:b0:3ea:f75d:4626 with SMTP id bi15-20020a05600c3d8f00b003eaf75d4626mr2867976wmb.38.1677886377746; Fri, 03 Mar 2023 15:32:57 -0800 (PST) Received: from smtpclient.apple (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.googlemail.com with ESMTPSA id b5-20020a05600c150500b003e91b9a92c9sm3544494wmg.24.2023.03.03.15.32.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Mar 2023 15:32:57 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Subject: Re: [PATCH][stage1] Remove conditionals around free() From: Iain Sandoe In-Reply-To: <30E6853A-2633-4483-A2B5-8691C7AD9F95@gmail.com> Date: Fri, 3 Mar 2023 23:32:56 +0000 Cc: Jerry D , sgk@troutmask.apl.washington.edu, GCC Fortran , GCC Patches , Ian Lance Taylor , Arnaud Charlet Content-Transfer-Encoding: quoted-printable Message-Id: References: <20230301222856.12300c64@nbbrfq> <30E6853A-2633-4483-A2B5-8691C7AD9F95@gmail.com> To: Bernhard Reutner-Fischer X-Mailer: Apple Mail (2.3696.120.41.1.2) X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > On 3 Mar 2023, at 23:11, Bernhard Reutner-Fischer via Fortran = wrote: >=20 > 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 ++---- >>>> libgfortran/io/format.c | 3 +-- >>>> libgfortran/io/transfer.c | 6 ++---- >>>> libgfortran/io/unix.c | 3 +-- >>>=20 >>> The Fortran ones are OK. >>>=20 >>=20 >> The only question I have: Is free posix compliant on all platforms? >>=20 >> 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.=E2=80=9D Iain >> It seems sometimes we run into things like this once in a while. >=20 > 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. >=20 >>=20 >> Otherwise I have no issue at all. It is a lot cleaner. >>=20 >> Jerry