We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b20539c commit 78dc67eCopy full SHA for 78dc67e
1 file changed
src/google/protobuf/port_def.inc
@@ -139,7 +139,13 @@
139
#endif
140
141
#define PROTOBUF_FUTURE_ADD_EARLY_NODISCARD [[nodiscard]]
142
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 13
143
+// GCC < 13 doesn't support mixing [[]] attributes with __attribute__, and this
144
+// is used with PROTOBUF_EXPORT for shared library visibility.
145
+#define PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED __attribute__((warn_unused))
146
+#else
147
#define PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ABSL_ATTRIBUTE_WARN_UNUSED
148
+#endif
149
150
#ifdef PROTOBUF_ALWAYS_INLINE
151
#error PROTOBUF_ALWAYS_INLINE was previously defined
0 commit comments