diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-11-21 17:00:05 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-11-21 17:00:06 +0900 |
commit | 78801a28ef790790945eb3cfe5389a554a4ac044 (patch) | |
tree | 2b7433c5d87fd7eab63b039455ed54abcb3b3c99 | |
parent | a96ee296357f1a382ea43fe4ca4f633d49e922cf (diff) | |
download | re2-78801a28ef790790945eb3cfe5389a554a4ac044.tar.gz re2-78801a28ef790790945eb3cfe5389a554a4ac044.tar.bz2 re2-78801a28ef790790945eb3cfe5389a554a4ac044.zip |
Imported Upstream version 20161101upstream/20161101
Change-Id: I4a69bc9e967d2c8f8374676316d4be5d8c050436
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
-rw-r--r-- | BUILD | 3 | ||||
-rw-r--r-- | re2/dfa.cc | 8 |
2 files changed, 11 insertions, 0 deletions
@@ -89,6 +89,7 @@ cc_library( cc_library( name = "test", + testonly = 1, srcs = ["util/test.cc"], deps = [":testing"], ) @@ -155,12 +156,14 @@ re2_test( cc_library( name = "benchmark", + testonly = 1, srcs = ["util/benchmark.cc"], deps = [":testing"], ) cc_binary( name = "regexp_benchmark", + testonly = 1, srcs = ["re2/testing/regexp_benchmark.cc"], linkopts = [ "-lm", @@ -123,7 +123,15 @@ class DFA { uint32_t flag_; // Empty string bitfield flags in effect on the way // into this state, along with kFlagMatch if this // is a matching 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 }; |