aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/glr.c4
-rw-r--r--data/lalr1.cc4
-rw-r--r--data/yacc.c4
3 files changed, 5 insertions, 7 deletions
diff --git a/data/glr.c b/data/glr.c
index 08d4a3e6..8cd6baf5 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -635,8 +635,8 @@ yytnamerr (char *yyres, const char *yystr)
if (*++yyp != '\\')
goto do_not_strip_quotes;
/* Fall through. */
-#if defined(__has_cpp_attribute) && __has_cpp_attribute(clang::fallthrough)
- [[clang::fallthrough]];
+#ifdef __cplusplus
+ [[fallthrough]];
#endif
default:
if (yyres)
diff --git a/data/lalr1.cc b/data/lalr1.cc
index c6e19777..06f0dedf 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -376,9 +376,7 @@ do { \
if (*++yyp != '\\')
goto do_not_strip_quotes;
/* Fall through. */
-#if defined(__has_cpp_attribute) && __has_cpp_attribute(clang::fallthrough)
- [[clang::fallthrough]];
-#endif
+ [[fallthrough]];
default:
yyr += *yyp;
break;
diff --git a/data/yacc.c b/data/yacc.c
index 17ad67c0..0f881d8d 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -1209,8 +1209,8 @@ yytnamerr (char *yyres, const char *yystr)
if (*++yyp != '\\')
goto do_not_strip_quotes;
/* Fall through. */
-#if defined(__has_cpp_attribute) && __has_cpp_attribute(clang::fallthrough)
- [[clang::fallthrough]];
+#ifdef __cplusplus
+ [[fallthrough]];
#endif
default:
if (yyres)