From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 4793A3858D20 for ; Wed, 9 Aug 2023 13:46:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4793A3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1691588811; bh=dqic2amXc7DbQWs7O4PW8DLqqOkBLCHS67a1AH39e3k=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=NebKWYHwiApOhlxl/3iXKBX0h12nzugRg5IDWp0pjNgiSX19QGmtwTKd6AuxsiNIr rLSXAsDLKKCdoraDl4a19mm8/22Ud2+wYLWdcEGoD3H3Yzw/MZ66MlN3p8/4MIB4e+ FfQ5Uw+fhQVdC3ehABmWid9FLaw+zetainVvbYAM= Received: from [IPv6:2409:8a0c:2a4:2170:40dc:a500:81f0:2] (unknown [IPv6:2409:8a0c:2a4:2170:40dc:a500:81f0:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id CA6AD659AD; Wed, 9 Aug 2023 09:46:44 -0400 (EDT) Message-ID: <0cef403e12afc400aabc904d1f2d4b69f7837372.camel@xry111.site> Subject: Re: ISO C's [static] (was: _Nullable and _Nonnull in GCC's analyzer) From: Xi Ruoyao To: Alejandro Colomar , Martin Uecker Cc: Andrew Pinski , GNU libc development , Adhemerval Zanella , Carlos O'Donell , Andreas Schwab , Siddhesh Poyarekar , Zack Weinberg , "gcc@gcc.gnu.org" , enh Date: Wed, 09 Aug 2023 21:46:17 +0800 In-Reply-To: References: <20230710161300.1678172-1-xry111@xry111.site> <1efbe0b2dd8fefffc945c6734222c7d6e04cf465.camel@xry111.site> <10994861-c244-ba4f-70ad-86d66acf7277@kernel.org> <08d7552c-d90a-ae84-4b7e-2f6f2136dd66@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,LIKELY_SPAM_FROM,SPF_HELO_PASS,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: On Wed, 2023-08-09 at 12:42 +0200, Alejandro Colomar wrote: > I have a gripe with ISO C's [static].=C2=A0 As you mention, ISO > conflated two functionalities in [static]: >=20 > -=C2=A0 The size of the array passed as argument must not be less > =C2=A0=C2=A0 than the size specified in the parameter's []. >=20 > -=C2=A0 The pointer must not be NULL. https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625559.html If this patch is merged, they'll just become __nonnull and have all advantages and disadvantages as __nonnull. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University