Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 20 lines 974 B view raw
1diff --git a/third-party/re2/src/re2/dfa.cc b/third-party/re2/src/re2/dfa.cc 2index 483f678..3aa3610 100644 3--- a/third-party/re2/src/re2/dfa.cc 4+++ b/third-party/re2/src/re2/dfa.cc 5@@ -101,8 +101,13 @@ class DFA { 6 uint flag_; // Empty string bitfield flags in effect on the way 7 // into this state, along with kFlagMatch if this 8 // is a matching state. 9- std::atomic<State*> next_[]; // Outgoing arrows from State, 10- // one per input byte class 11+// Work around the bug affecting flexible array members in GCC 6.1 and 6.2. 12+// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932) 13+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 6 && __GNUC_MINOR__ >= 1 14+ std::atomic<State*> next_[0]; // Outgoing arrows from State, one per input byte class 15+#else 16+ std::atomic<State*> next_[]; // Outgoing arrows from State, one per input byte class 17+#endif 18 }; 19 20 enum {