summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-05-12 10:16:11 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-07-24 14:39:20 +0900
commit2509297258b40f8b55bee252611efc28a12f2f67 (patch)
treec8f8469b385a2c33706580943aad00b060b861cd
parente26e8423b5b8a375a8fd6412a99eb6a8cc73cf2c (diff)
Separate `__has_attribute` from `defined(__has_attribute)`
Fix Visual C warnings: ``` regenc.h(121): warning C4067: unexpected tokens following preprocessor directive - expected a newline ```
-rw-r--r--regenc.h4
1 files changed, 3 insertions, 1 deletions
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;