[libcxx-commits] [libcxx] [libc++] Don't #define __unused with glibc in system_reserved_names.gen.py (PR #206971)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 1 05:50:36 PDT 2026
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/206971
Newer glibc versions use the identifier `__unused`. To run the test successufly again disable the `__unused` check with glibc.
>From 0e7a566f7a27663a25f83154e8fd8f3d11763186 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Wed, 1 Jul 2026 14:48:13 +0200
Subject: [PATCH] [libc++] Don't #define __unused with glibc in
system_reserved_names.gen.py
---
libcxx/test/libcxx/system_reserved_names.gen.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/test/libcxx/system_reserved_names.gen.py b/libcxx/test/libcxx/system_reserved_names.gen.py
index aaaa385409be4..a0364eeed3256 100644
--- a/libcxx/test/libcxx/system_reserved_names.gen.py
+++ b/libcxx/test/libcxx/system_reserved_names.gen.py
@@ -122,7 +122,7 @@
#define __release SYSTEM_RESERVED_NAME
// Android and FreeBSD use this for __attribute__((__unused__))
-#if !defined(__FreeBSD__) && !defined(__ANDROID__)
+#if !defined(__FreeBSD__) && !defined(__ANDROID__) && !defined(__GLIBC__)
#define __unused SYSTEM_RESERVED_NAME
#endif
More information about the libcxx-commits
mailing list