aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2018-07-19 10:23:22 -0700
committerGitHub <noreply@github.com>2018-07-19 10:23:22 -0700
commit71985bed4faaaa873369be4cc8e4690dea22966c (patch)
tree628b2cdb626c110f50bb08ccdbbc8f3c76e57ff9
parentc934cb7eaff31aff63c10f4336dcfc5e6c45d6a3 (diff)
parent39c3654e901b4fc35386989cbad49fad8a68c024 (diff)
downloadprotobuf-71985bed4faaaa873369be4cc8e4690dea22966c.tar.gz
protobuf-71985bed4faaaa873369be4cc8e4690dea22966c.tar.bz2
protobuf-71985bed4faaaa873369be4cc8e4690dea22966c.zip
Merge pull request #4936 from arashikou/3.5.x
Do Not Define GOOGLE_FALLTHROUGH_INTENDED on GCC Without Attribute Support
-rw-r--r--src/google/protobuf/stubs/port.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h
index cecefdcb..7c6e2c45 100644
--- a/src/google/protobuf/stubs/port.h
+++ b/src/google/protobuf/stubs/port.h
@@ -243,7 +243,7 @@ static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF);
__has_cpp_attribute(clang::fallthrough)
# define GOOGLE_FALLTHROUGH_INTENDED [[clang::fallthrough]]
# endif
-#elif defined(__GNUC__) && __GNUC__ > 6
+#elif defined(__GNUC__) && __GNUC__ > 6 && __cpp_attributes >= 200809
# define GOOGLE_FALLTHROUGH_INTENDED [[gnu::fallthrough]]
#endif