Skip to content

Commit

Permalink
Clean up __GNUC__ conditions.
Browse files Browse the repository at this point in the history
GCC 6.5 was released nearly five years ago.

Change-Id: Ic9a3e7a51ee40385cc046c97282d4c2b556b3df4
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61710
Reviewed-by: Alex Chernyakhovsky <[email protected]>
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Aug 17, 2023
1 parent 6148386 commit 08d338f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions re2/dfa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,8 @@ class DFA {
// into this state, along with kFlagMatch if this
// is a matching state.

// Work around the bug affecting flexible array members in GCC 6.x (for x >= 1).
// (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,
// one per input byte class
#else
std::atomic<State*> next_[]; // Outgoing arrows from State,
// one per input byte class
#endif
};

enum {
Expand Down
2 changes: 1 addition & 1 deletion re2/re2.h
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ inline RE2::Arg RE2::Octal(T* ptr) {
}

// Silence warnings about missing initializers for members of LazyRE2.
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 6
#if !defined(__clang__) && defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif

Expand Down
2 changes: 1 addition & 1 deletion util/pcre.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "util/pcre.h"

// Silence warnings about the wacky formatting in the operator() functions.
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 6
#if !defined(__clang__) && defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
#endif

Expand Down

0 comments on commit 08d338f

Please sign in to comment.