[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing <stdlib.h> include in lib/autoconf/c.m4

From: Zack Weinberg
Subject: Re: Missing <stdlib.h> include in lib/autoconf/c.m4
Date: Thu, 10 Nov 2022 22:25:53 -0500
User-agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead

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 via email to

[Prev in Thread] Current Thread [Next in Thread]