diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-11-02 18:07:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-11-02 18:07:03 +0000 |
commit | a8ab20ff88a9b962a8eb39cdb6944a2354f78748 (patch) | |
tree | 0ff17bc9e4b3da99f843f37ddbb818b79a16dc76 | |
parent | dc1ffa73d10cef88afdbee90a6bd84f28ab69b82 (diff) | |
parent | 90976cf2fc0200434a631ea01304675d9efc7b98 (diff) | |
download | bison-a8ab20ff88a9b962a8eb39cdb6944a2354f78748.tar.gz |
Merge "Fix mesa3d build w/C and __has_cpp_attribute"
-rw-r--r-- | data/glr.c | 4 | ||||
-rw-r--r-- | data/lalr1.cc | 4 | ||||
-rw-r--r-- | data/yacc.c | 4 |
3 files changed, 5 insertions, 7 deletions
@@ -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) |