Skip to content

Commit

Permalink
Update for R CMD check
Browse files Browse the repository at this point in the history
  • Loading branch information
qinwf committed Aug 22, 2017
1 parent ba3f8bf commit 0a46185
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
8 changes: 7 additions & 1 deletion inst/include/re2/prog.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,18 @@ class Prog {

int32_t match_id_; // opcode == kInstMatch
// Match ID to identify this match (for re2::Set).

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
struct { // opcode == kInstByteRange
uint8_t lo_; // byte range is lo_-hi_ inclusive
uint8_t hi_; //
uint8_t foldcase_; // convert A-Z to a-z before checking range.
};
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

EmptyOp empty_; // opcode == kInstEmptyWidth
// empty_ is bitwise OR of kEmpty* flags above.
Expand Down
8 changes: 7 additions & 1 deletion inst/include/re2/regexp.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,10 @@ class Regexp {

// Extra space for parse and teardown stacks.
Regexp* down_;

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
// Arguments to operator. See description of operators above.
union {
struct { // Repeat
Expand All @@ -582,6 +585,9 @@ class Regexp {
int match_id_; // HaveMatch
void *the_union_[2]; // as big as any other element, for memset
};
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

Regexp(const Regexp&) = delete;
Regexp& operator=(const Regexp&) = delete;
Expand Down
8 changes: 8 additions & 0 deletions src/dfa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ 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.
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif

// 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)
Expand All @@ -135,6 +139,10 @@ class DFA {
std::atomic<State*> next_[]; // Outgoing arrows from State,
#endif

#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

// one per input byte class
};

Expand Down

0 comments on commit 0a46185

Please sign in to comment.