Message ID | 20230617222218.642125-4-bugaevc@gmail.com |
---|---|
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=8.43.85.97; helo=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=En9+QDmV; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 4Qk9Wy5mDYz20WT for <incoming@patchwork.ozlabs.org>; Sun, 18 Jun 2023 08:22:54 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B6E20385771D for <incoming@patchwork.ozlabs.org>; Sat, 17 Jun 2023 22:22:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6E20385771D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1687040572; bh=gnxSSayFV8jfFvxXyBOVBXLfXedT5YpgIVK6kp2W++0=; 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=En9+QDmVr3JeZ0XH8jl8q2btq8rDyrkJDzeHl+94RmTl4ZttJCBPEl+mX7TRIuSwl Q96la4bPqTcz8rijhOhEFynqETzc5t41vvh1WvzKNFPhQPsqB0Lh8rwU7GJ/CrifOz pezMiEmABokw43tFgt6Ond6aHTOOSk9j71qdJxiw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id 20A163858D3C for <libc-alpha@sourceware.org>; Sat, 17 Jun 2023 22:22:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 20A163858D3C Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f62cf9755eso2620506e87.1 for <libc-alpha@sourceware.org>; Sat, 17 Jun 2023 15:22:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687040544; x=1689632544; 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=gnxSSayFV8jfFvxXyBOVBXLfXedT5YpgIVK6kp2W++0=; b=FRz9IE94HRuHXCQ9mW3KhokM97/arekQ6eJbPxVHZoJlcbpEekCeGxEk/LyYaXo9U+ rlBWcXqFcbIe5+XL3UEyKlTiUkcZcTy6fSkXjh61kro5+AhkdXW6hJfX22wqK6Dn847z drZv044nj1PviXkk5zLXcUO5FXLZR0O0BWyhP1j4ENPKEZ8FKHeYabUwrD6f+7YFYPV0 z4md6LlmUbQSKBGoIUycOac1p56f2BFpzhO0mg+cB8P5RhU/Rz7yXZSQDPTWGzn4tJ8s Y5Qj9huIW0nLN15XmjAynlK1llcbgT5fpEklwMf0IXPaGzi3FggWTBz3pGWGRkWRSCRa yHvg== X-Gm-Message-State: AC+VfDxV0IPYWHXo6jDw8EgpDJ4PFFqtuaO5TA9uzC1rEK3lZg/8RxnM 0x2mN+iyIrIzoZVtaFOflX++pvd9byw= X-Google-Smtp-Source: ACHHUZ7mkB/AfWNMNk5XEL2A286rGhfbaAWvvUUbwqSHN09Skgh8YfD1+FfJ8jIxGIzxPF/E33PVaw== X-Received: by 2002:a19:7b0b:0:b0:4f6:1779:b1c1 with SMTP id w11-20020a197b0b000000b004f61779b1c1mr3742588lfc.48.1687040544297; Sat, 17 Jun 2023 15:22:24 -0700 (PDT) Received: from surface-pro-6.. ([2a00:1370:818c:173b:cc34:4e0d:9ea6:c16c]) by smtp.gmail.com with ESMTPSA id j28-20020ac253bc000000b004f76a88dbcbsm1567091lfh.176.2023.06.17.15.22.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 15:22:23 -0700 (PDT) To: libc-alpha@sourceware.org Cc: Nick Desaulniers <ndesaulniers@google.com> Subject: [PATCH v3 3/5] cdefs.h: Enable __errordecl & __warnattr for Clang 14+ Date: Sun, 18 Jun 2023 01:22:16 +0300 Message-ID: <20230617222218.642125-4-bugaevc@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230617222218.642125-1-bugaevc@gmail.com> References: <20230617222218.642125-1-bugaevc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: Sergey Bugaev via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Sergey Bugaev <bugaevc@gmail.com> Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org> |
Series |
fcntl fortification
|
expand
|
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 6ca8ca31..9b84043f 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -208,7 +208,7 @@ : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)))) #endif -#if __GNUC_PREREQ (4,3) +#if __GNUC_PREREQ (4,3) || __glibc_clang_prereq (14,0) # define __warnattr(msg) __attribute__((__warning__ (msg))) # define __errordecl(name, msg) \ extern void name (void) __attribute__((__error__ (msg)))
Clang 14 (released in March 2022) has added support for attribute ((error)) and attribute ((warning)). Enable their usage when Clang 14 or later is detected, to get nicer diagnostics. https://reviews.llvm.org/D106030 https://github.com/llvm/llvm-project/commit/846e562dcc6a9a611d844dc0d123da95629a0567 Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> --- misc/sys/cdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)