From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id C27CB3858D3C for ; Tue, 21 Mar 2023 17:28:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C27CB3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=deneb.enyo.de Received: from [172.17.203.2] (port=59999 helo=deneb.enyo.de) by albireo.enyo.de ([172.17.140.2]) with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1pefmf-00ArUO-FL; Tue, 21 Mar 2023 17:28:29 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.96) (envelope-from ) id 1pefmf-000RIx-1A; Tue, 21 Mar 2023 18:28:29 +0100 From: Florian Weimer To: DJ Delorie via Libc-alpha Cc: DJ Delorie Subject: Re: [patch v3] aligned_alloc: conform to C17 References: Date: Tue, 21 Mar 2023 18:28:29 +0100 In-Reply-To: (DJ Delorie via Libc-alpha's message of "Tue, 21 Mar 2023 00:47:57 -0400") Message-ID: <877cvaf1z6.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_NUMSUBJECT,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * DJ Delorie via Libc-alpha: > +/* For ISO C11. */ > +static void * > +__libc_aligned_alloc (size_t alignment, size_t bytes) > +{ > +weak_alias (__libc_aligned_alloc, aligned_alloc) I'm surprised that this even compiles. This sort of makes the function static and gives it external linkage. Is anything calling __libc_aligned_alloc? Perhaps you could use this? static void * weak_function aligned_alloc (size_t alignment, size_t bytes) { Assuming that there are no internal callers.