c-std-porting.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: Zack Weinberg <zack@owlfolio.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: Fri, 11 Nov 2022 03:28:33 +0000	[thread overview]
Message-ID: <AE18ADCD-EEC7-49B5-889D-22A13C84D03D@gentoo.org> (raw)
In-Reply-To: <8610af71-9afe-4698-9686-27562478b11a@app.fastmail.com>

[-- Attachment #1: Type: text/plain, Size: 978 bytes --]



> On 11 Nov 2022, at 03:25, Zack Weinberg <zack@owlfolio.org> wrote:
> 
> 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.
> 
> 

Thanks for doing that.

>>> 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>?
> 

Oh right! We're all good then.

Cheers,
sam

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

      reply	other threads:[~2022-11-11  3:28 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
2022-11-11  3:28       ` Sam James [this message]

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=AE18ADCD-EEC7-49B5-889D-22A13C84D03D@gentoo.org \
    --to=sam@gentoo.org \
    --cc=bug-autoconf@gnu.org \
    --cc=c-std-porting@lists.linux.dev \
    --cc=zack@owlfolio.org \
    /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 NNTP newsgroup(s).