diff options
author | Adam Cozzette <acozzette@google.com> | 2016-06-29 15:23:27 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2016-06-29 15:38:03 -0700 |
commit | d64a2d9941c36a7bc2a7959ea10ab8363192ac14 (patch) | |
tree | 52330d146ad63d3d70f3baade00d5d1fea8f5e0c /src/google/protobuf/stubs | |
parent | c18aa7795a2e02ef700ff8b039d94ecdcc33432f (diff) |
Integrated internal changes from Google
This includes all internal changes from around May 20 to now.
Diffstat (limited to 'src/google/protobuf/stubs')
-rw-r--r-- | src/google/protobuf/stubs/mathlimits.h | 6 | ||||
-rw-r--r-- | src/google/protobuf/stubs/port.h | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/google/protobuf/stubs/mathlimits.h b/src/google/protobuf/stubs/mathlimits.h index d9846940..70e47bff 100644 --- a/src/google/protobuf/stubs/mathlimits.h +++ b/src/google/protobuf/stubs/mathlimits.h @@ -230,11 +230,11 @@ DECL_UNSIGNED_INT_LIMITS(unsigned long long int) static bool IsNegInf(const Type x) { return _fpclass(x) == _FPCLASS_NINF; } #else #define DECL_FP_LIMIT_FUNCS \ - static bool IsFinite(const Type x) { return !isinf(x) && !isnan(x); } \ + static bool IsFinite(const Type x) { return !isinf(x) && !isnan(x); } \ static bool IsNaN(const Type x) { return isnan(x); } \ static bool IsInf(const Type x) { return isinf(x); } \ - static bool IsPosInf(const Type x) { return isinf(x) && x > 0; } \ - static bool IsNegInf(const Type x) { return isinf(x) && x < 0; } + static bool IsPosInf(const Type x) { return isinf(x) && x > 0; } \ + static bool IsNegInf(const Type x) { return isinf(x) && x < 0; } #endif // We can't put floating-point constant values in the header here because diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h index 0e65fc8f..328258b7 100644 --- a/src/google/protobuf/stubs/port.h +++ b/src/google/protobuf/stubs/port.h @@ -174,6 +174,15 @@ static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF); #endif #endif +#ifndef GOOGLE_ATTRIBUTE_NORETURN +#ifdef __GNUC__ +// Tell the compiler that a given function never returns. +#define GOOGLE_ATTRIBUTE_NORETURN __attribute__((noreturn)) +#else +#define GOOGLE_ATTRIBUTE_NORETURN +#endif +#endif + #ifndef GOOGLE_ATTRIBUTE_DEPRECATED #ifdef __GNUC__ // If the method/variable/type is used anywhere, produce a warning. |