1From 20e0b159b36aabcdd7b33c07f8a20b4dd9c2a25f Mon Sep 17 00:00:00 2001
2From: Michael Forney <mforney@mforney.org>
3Date: Thu, 2 Apr 2026 23:45:13 -0700
4Subject: [PATCH] Use _Static_assert instead of asm("") for empty declaration
5
6Also, use the same technique for LCRYPTO_USED.
7---
8 crypto/hidden/crypto_namespace.h | 6 +++---
9 ssl/hidden/ssl_namespace.h | 4 ++--
10 2 files changed, 5 insertions(+), 5 deletions(-)
11
12diff --git a/crypto/hidden/crypto_namespace.h b/crypto/hidden/crypto_namespace.h
13index 43c8718..4ad8ce0 100644
14--- a/crypto/hidden/crypto_namespace.h
15+++ b/crypto/hidden/crypto_namespace.h
16@@ -42,13 +42,13 @@
17 # define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x)
18 #endif
19 #else
20-# define LCRYPTO_UNUSED(x)
21-# define LCRYPTO_USED(x)
22+# define LCRYPTO_UNUSED(x) _Static_assert(1, "")
23+# define LCRYPTO_USED(x) _Static_assert(1, "")
24 # define LCRYPTO_ALIAS1(pre,x)
25 #ifdef _MSC_VER
26 # define LCRYPTO_ALIAS(x)
27 #else
28-# define LCRYPTO_ALIAS(x) asm("")
29+# define LCRYPTO_ALIAS(x) _Static_assert(1, "")
30 #endif /* _MSC_VER */
31 #endif
32
33diff --git a/ssl/hidden/ssl_namespace.h b/ssl/hidden/ssl_namespace.h
34index 763dcd7..d48c95e 100644
35--- a/ssl/hidden/ssl_namespace.h
36+++ b/ssl/hidden/ssl_namespace.h
37@@ -34,11 +34,11 @@
38 #endif
39 #else
40 #define LSSL_UNUSED(x)
41-#define LSSL_USED(x)
42+#define LSSL_USED(x) _Static_assert(1, "")
43 #ifdef _MSC_VER
44 #define LSSL_ALIAS(x)
45 #else
46-#define LSSL_ALIAS(x) asm("")
47+#define LSSL_ALIAS(x) _Static_assert(1, "")
48 #endif /* _MSC_VER */
49 #endif
50
51--
522.49.0
53