Skip to content

Commit

Permalink
Remove disabling -Warray-bounds for GCC in FBString.h (#999)
Browse files Browse the repository at this point in the history
Summary:
- Existing code disables `-Warray-bounds` warning for GCC due to a bug in
  GCC 4.9.
- As seen in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124, the bug
  has been resolved for GCC 5.1.
- Since the bug has been resolved, we no longer need to disable the
  warning.

yfeldblum I suspect that we have to hold off on this PR until the internal use cases relying on GCC 4.9 upgrade, but I figured it is better to have some of these cleanup opportunities ready for when the time arises.
Pull Request resolved: #999

Reviewed By: ot, Orvid

Differential Revision: D13729723

Pulled By: yfeldblum

fbshipit-source-id: da33704c2e2022c2dad0681e4d6152105a1cf54d
  • Loading branch information
JoeLoser authored and facebook-github-bot committed Feb 26, 2019
1 parent 6f14ffa commit 268ab2a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions folly/FBString.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@
FOLLY_PUSH_WARNING
// Ignore shadowing warnings within this file, so includers can use -Wshadow.
FOLLY_GNU_DISABLE_WARNING("-Wshadow")
// GCC 4.9 has a false positive in setSmallSize (probably
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124), disable
// compile-time array bound checking.
FOLLY_GNU_DISABLE_WARNING("-Warray-bounds")

// FBString cannot use throw when replacing std::string, though it may still
// use folly::throw_exception
Expand Down

0 comments on commit 268ab2a

Please sign in to comment.