Message ID | 20230710150454.5490-2-cristian@rodriguez.im |
---|---|
State | New |
Headers | show
Return-Path: <libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=o5DGzJRO; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R06lK1Z48z20Ph for <incoming@patchwork.ozlabs.org>; Tue, 11 Jul 2023 01:06:05 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 222553850AC7 for <incoming@patchwork.ozlabs.org>; Mon, 10 Jul 2023 15:06:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 222553850AC7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689001563; bh=C2Yali1qCQomKRgnavBjuzYNxurwm5fBzRskPWGDMhw=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=o5DGzJROq0RY3gKL7H6U8qXjMygIIcd0SSlnzQaojEieOBIjO6tzSofHuU4h9cVkC yj02/4nNCAdQipIod73eRUFxBD8SdGiD1lbENo4B0FOpeiWN2Uav76eMm3AtJfX+py vDxkQ/hWb0yzS/QGexc2YrBbLBe5h0HE5Yk4noq8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id 9CA86385AF9A for <libc-alpha@sourceware.org>; Mon, 10 Jul 2023 15:05:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9CA86385AF9A Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-6b751cb88bfso523449a34.1 for <libc-alpha@sourceware.org>; Mon, 10 Jul 2023 08:05:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689001510; x=1691593510; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C2Yali1qCQomKRgnavBjuzYNxurwm5fBzRskPWGDMhw=; b=Q82/Df8TgJ4W05cELSzt+TeXgwp8K+EdhM5FomRRNyRjf9qgA6GwXimr0UW0dFsOaA 4g7tm4DVV42NUjXt063evy+dgzTGg8tDUBySIl47dMndfAb+SqG6IJ+BOGKLdqJP8qRs j8r4D0lbi5F2kBKJ6QB+EGBYJ2mafBHUvt4/OQQcNEdw/Kb0yg8AlpO3rLqQgdNzQmme 1HcCX7WyxF4N7FafDhK+C7f8mWTRRjlrgwzklWVCoPpj7t7Xa7Hq/LAs5cVOG+gcrbUk wCNag9W2VkWEBAd7RV19kAM2nG6ez8gbYahF0Stliqxng8f+BgU52uGXCVk8rHFy00ev CkHg== X-Gm-Message-State: ABy/qLa4ED3ulCF7TIXlpT38UazzCdUvDEMv3ZAvY4hiqzHXfxLulftn q7/FcFIp8TQ6kPb3SZDla8cFdvJI4uwP2kr3YrY= X-Google-Smtp-Source: APBJJlHLOhwn1EiQK4bZvw8OtzYSgtseIDYA8Iwpd4N0xUYg5AF2UpqhNRXq+5PXIUJnQD/o2mIjZA== X-Received: by 2002:a05:6830:3595:b0:6b8:b83c:a23c with SMTP id bd21-20020a056830359500b006b8b83ca23cmr7630142otb.3.1689001509711; Mon, 10 Jul 2023 08:05:09 -0700 (PDT) Received: from tumbleweedvm.. (181-162-56-31.baf.movistar.cl. [181.162.56.31]) by smtp.gmail.com with ESMTPSA id r2-20020a9d7cc2000000b006b756242c98sm48236otn.19.2023.07.10.08.05.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 08:05:09 -0700 (PDT) To: libc-alpha@sourceware.org Cc: =?utf-8?q?Cristian_Rodr=C3=ADguez?= <cristian@rodriguez.im> Subject: [PATCH 1/6] Introduce __decl_is_flex_array macro Date: Mon, 10 Jul 2023 15:04:37 +0000 Message-ID: <20230710150454.5490-2-cristian@rodriguez.im> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230710150454.5490-1-cristian@rodriguez.im> References: <20230710150454.5490-1-cristian@rodriguez.im> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: =?utf-8?q?Cristian_Rodr=C3=ADguez_via_Libc-alpha?= <libc-alpha@sourceware.org> Reply-To: =?utf-8?q?Cristian_Rodr=C3=ADguez?= <cristian@rodriguez.im> Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org> |
Series |
Support use of -fstrict-flex-arrays in user code
|
expand
|
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 90c21e2703..183cc5e2c9 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -720,4 +720,10 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf # define __attribute_returns_twice__ /* Ignore. */ #endif +#if __glibc_has_attribute (__strict_flex_array__) +#define __decl_is_flex_array __attribute__ ((__strict_flex_array__(0))) +#else +#define __decl_is_flex_array +#endif + #endif /* sys/cdefs.h */
Currently it is not possible to safely build user code with GCC-13 -fstrict-flex-arrays due to the library use of legacy fake flexible arrays and zero-length array gcc extension. This commit introduces a __decl_is_flex_array macro intended to grandfather-in this uses without modifying the relevant definitions. Signed-off-by: Cristian RodrÃguez <cristian@rodriguez.im> --- misc/sys/cdefs.h | 6 ++++++ 1 file changed, 6 insertions(+)