From f1f0cc14cc7d3f9be35b203e5583f9224b1e2387 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 12 May 2025 10:16:11 +0900 Subject: [PATCH] Separate `__has_attribute` from `defined(__has_attribute)` Fix Visual C warnings: ``` regenc.h(121): warning C4067: unexpected tokens following preprocessor directive - expected a newline ``` --- regenc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/regenc.h b/regenc.h index b353ae0f9e..4b4d21a715 100644 --- a/regenc.h +++ b/regenc.h @@ -118,8 +118,10 @@ typedef struct { typedef struct { short int len; -#if defined(__has_attribute) && __has_attribute(nonstring) +#if defined(__has_attribute) +# if __has_attribute(nonstring) __attribute__((nonstring)) +# endif #endif const UChar name[6]; int ctype;