PR #22579 opened by Kacper Michajłow (kasper93)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22579
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22579.patch

It was disabled because at the time this attribute was not supported.
It was implemented in Clang/LLVM 3.5 [1].

This patch enables flatten attribute unconditionally, as Clang 3.5 is
currently not able to build FFmpeg anyway, so no need to worry about
those ancient versions.

This reverts change 5858a67f135a7395c548482c73cf3d39bcdd3022.

[1] 
https://github.com/llvm/llvm-project/commit/41af7c2fdc8cc2ef186669dcb21cac58d5bd69ee


From a229b03f845817d601334f98c2b114708e913751 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sun, 22 Mar 2026 14:26:40 +0100
Subject: [PATCH] avutil/attributes: enable av_flatten on clang

It was disabled because at the time this attribute was not supported.
It was implemented in Clang/LLVM 3.5 [1].

This patch enables flatten attribute unconditionally, as Clang 3.5 is
currently not able to build FFmpeg anyway, so no need to worry about
those ancient versions.

This reverts change 5858a67f135a7395c548482c73cf3d39bcdd3022.

[1] 
https://github.com/llvm/llvm-project/commit/41af7c2fdc8cc2ef186669dcb21cac58d5bd69ee
---
 libavutil/attributes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index 0e49b22b9d..67fc5bab40 100644
--- a/libavutil/attributes.h
+++ b/libavutil/attributes.h
@@ -111,7 +111,7 @@
 #    define av_cold
 #endif
 
-#if AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__llvm__)
+#if AV_GCC_VERSION_AT_LEAST(4,1) || defined(__clang__)
 #    define av_flatten __attribute__((flatten))
 #else
 #    define av_flatten
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to