Skip to content

Commit

Permalink
Add: GCC 6.2 bug workaround commit #12
Browse files Browse the repository at this point in the history
  • Loading branch information
qinwf committed Dec 19, 2016
1 parent 07ac1f5 commit 1b1f4f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dfa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,15 @@ class DFA {
uint flag_; // Empty string bitfield flags in effect on the way
// into this state, along with kFlagMatch if this
// is a matching state.
// std::atomic<State*> next_[]; // Outgoing arrows from State,

// Work around the bug affecting flexible array members in GCC 6.1 and 6.2.
// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932)
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 6 && __GNUC_MINOR__ >= 1
std::atomic<State*> next_[0]; // Outgoing arrows from State,
#else
std::atomic<State*> next_[]; // Outgoing arrows from State,
#endif
// one per input byte class
};

Expand Down

0 comments on commit 1b1f4f9

Please sign in to comment.