c-std-porting.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "Zack Weinberg" <zack@owlfolio.org>
To: "Sam James" <sam@gentoo.org>
Cc: "Autoconf Bugs" <bug-autoconf@gnu.org>, c-std-porting@lists.linux.dev
Subject: Re: Missing <stdlib.h> include in lib/autoconf/c.m4
Date: Thu, 10 Nov 2022 22:25:53 -0500	[thread overview]
Message-ID: <8610af71-9afe-4698-9686-27562478b11a@app.fastmail.com> (raw)
In-Reply-To: <0B8F55B0-E16F-45B1-8037-ED96A12CF0F4@gentoo.org>

On Thu, Nov 10, 2022, at 10:18 PM, Sam James wrote:
>> On 5 Nov 2022, at 22:37, Sam James <sam@gentoo.org> wrote:
>> I would send a patch for the original issue but I'm wondering how to handle freestanding (see big comment above _AC_C_C89_TEST_GLOBALS).

Yeah, we can't include <stdlib.h> here, but it should be OK to add a manual declaration of free (as I did in bf5a75...) -- there was already a manual declaration of malloc, and free doesn't even need size_t.

>> We need another one (<assert.h>) I think for _Static_assert in _AC_C_C11_TEST_GLOBALS too, up until C23?

I think this should be fine as is; in C11, _Static_assert is a keyword / special form, so it's safe to use without <assert.h>.  IIUC the change in C23 is to make static_assert also available without <assert.h>?


  reply	other threads:[~2022-11-11  3:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <04038EC0-622D-4806-97A3-465124CD25F7@gentoo.org>
     [not found] ` <A7F4BEF8-2E51-4390-A137-4998A19A8EB7@gentoo.org>
2022-11-11  3:18   ` Missing <stdlib.h> include in lib/autoconf/c.m4 Sam James
2022-11-11  3:25     ` Zack Weinberg [this message]
2022-11-11  3:28       ` Sam James

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:

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

  git send-email \
    --in-reply-to=8610af71-9afe-4698-9686-27562478b11a@app.fastmail.com \
    --to=zack@owlfolio.org \
    --cc=bug-autoconf@gnu.org \
    --cc=c-std-porting@lists.linux.dev \
    --cc=sam@gentoo.org \


* 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 NNTP newsgroup(s).