diff --git a/src/google/protobuf/compiler/cpp/generator.cc b/src/google/protobuf/compiler/cpp/generator.cc index bd9ea7d1fb71..cbff8cdaefcc 100644 --- a/src/google/protobuf/compiler/cpp/generator.cc +++ b/src/google/protobuf/compiler/cpp/generator.cc @@ -376,7 +376,6 @@ absl::Status CppGenerator::ValidateFeatures(const FileDescriptor* file) const { } } -#ifdef PROTOBUF_FUTURE_REMOVE_WRONG_CTYPE if (field.options().has_ctype()) { if (field.cpp_type() != FieldDescriptor::CPPTYPE_STRING) { status = absl::FailedPreconditionError(absl::StrCat( @@ -391,7 +390,6 @@ absl::Status CppGenerator::ValidateFeatures(const FileDescriptor* file) const { } } } -#endif // !PROTOBUF_FUTURE_REMOVE_WRONG_CTYPE }); return status; } diff --git a/src/google/protobuf/compiler/cpp/generator_unittest.cc b/src/google/protobuf/compiler/cpp/generator_unittest.cc index 454b7826e666..b1ee0e3785f0 100644 --- a/src/google/protobuf/compiler/cpp/generator_unittest.cc +++ b/src/google/protobuf/compiler/cpp/generator_unittest.cc @@ -148,7 +148,6 @@ TEST_F(CppGeneratorTest, LegacyClosedEnumImplicit) { "Field Foo.bar has a closed enum type with implicit presence."); } -#ifdef PROTOBUF_FUTURE_REMOVE_WRONG_CTYPE TEST_F(CppGeneratorTest, CtypeOnNoneStringFieldTest) { CreateTempFile("foo.proto", R"schema( @@ -181,7 +180,6 @@ TEST_F(CppGeneratorTest, CtypeOnExtensionTest) { "Extension bar specifies ctype=CORD which is " "not supported for extensions."); } -#endif // !PROTOBUF_FUTURE_REMOVE_WRONG_CTYPE } // namespace } // namespace cpp } // namespace compiler diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index ac61dcd59a51..a7edd9b6c557 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -167,10 +167,6 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), // Owner: ezb@ #define PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API 1 -// Used to lock down wrong ctype usages in proto file. -// Owner: jieluo@ -#define PROTOBUF_FUTURE_REMOVE_WRONG_CTYPE 1 - #endif // Defines the Protobuf C++ Version for checking version compatibility at