aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs
diff options
context:
space:
mode:
authorGravatar Jisi Liu <liujisi@google.com>2017-10-19 10:54:50 -0700
committerGravatar GitHub <noreply@github.com>2017-10-19 10:54:50 -0700
commit2a142140453248fc49915c4a24561a84a24540ef (patch)
tree5cba2d7041b6fc803502eee5786616de3a45d055 /src/google/protobuf/stubs
parent07b9238a1c03ef0351bcb4ca57d773eb7b7c5824 (diff)
parent37e112f45616a88d7904552fd2a7d9142d9f9a0b (diff)
Merge pull request #3754 from toanju/gcc-fallthrough
fix implicit fallthrough in gcc 7
Diffstat (limited to 'src/google/protobuf/stubs')
-rw-r--r--src/google/protobuf/stubs/port.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h
index 19ac6f1c..cecefdcb 100644
--- a/src/google/protobuf/stubs/port.h
+++ b/src/google/protobuf/stubs/port.h
@@ -243,6 +243,8 @@ static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF);
__has_cpp_attribute(clang::fallthrough)
# define GOOGLE_FALLTHROUGH_INTENDED [[clang::fallthrough]]
# endif
+#elif defined(__GNUC__) && __GNUC__ > 6
+# define GOOGLE_FALLTHROUGH_INTENDED [[gnu::fallthrough]]
#endif
#ifndef GOOGLE_FALLTHROUGH_INTENDED