Re: Missing <stdlib.h> include in lib/autoconf/c.m4
Sam James <[email protected]> Fri, 11 Nov 2022 03:28:33 +0000
| Newsgroups | dev.linux.lists.c-std-porting |
|---|---|
| Message-ID | <[email protected]> |
> On 11 Nov 2022, at 03:25, Zack Weinberg <[email protected]> wrote: > > On Thu, Nov 10, 2022, at 10:18 PM, Sam James wrote: >>> On 5 Nov 2022, at 22:37, Sam James <[email protected]> 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
signature.asc
(application/pgp-signature, 358 B)
-----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY23BYl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kEKCAQDSfEP2ka2b3xLivCpBkSE3cuyCYXsHIXqqwhfEgI/a5gEAlD6WwNQq+H8n BuiSkaf0TuczSsQDk210qc3h7EltNg4= =RSge -----END PGP SIGNATURE-----