diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h index 19ac6f1c00..cecefdcb3b 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