From 09f94e7311ddb407bb5c2ac5d4d65a8357524b0f Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Sat, 20 Feb 2021 12:09:52 +0300 Subject: [PATCH] Fix PROTOBUF_CONSTINIT macro redifinition The #ifdef block is duplicated with the above (which was fixed in 3.15.1). It would be great to have this fix backported to 3.15.1 (and released as 3.15.2). --- src/google/protobuf/port_def.inc | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 6b6d34db0201..32fcc271f205 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -575,17 +575,6 @@ #define PROTOBUF_CONSTINIT #endif -#if defined(__cpp_constinit) -#define PROTOBUF_CONSTINIT constinit -#elif defined(__has_cpp_attribute) -#if __has_cpp_attribute(clang::require_constant_initialization) -#define PROTOBUF_CONSTINIT [[clang::require_constant_initialization]] -#endif -#endif -#ifndef PROTOBUF_CONSTINIT -#define PROTOBUF_CONSTINIT -#endif - // Some globals with an empty non-trivial destructor are annotated with // no_destroy for performance reasons. It reduces the cost of these globals in // non-opt mode and under sanitizers.