From: Eric Niebler Date: Thu, 8 Jun 2017 19:47:55 +0000 (-0700) Subject: Extend the -Warray-bounds workaround in FixedString.h to gcc-5. X-Git-Tag: v2017.06.12.00~13 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=16f34c7d5024564897bd4ab6ca9b6725747c2ea6;p=folly.git Extend the -Warray-bounds workaround in FixedString.h to gcc-5. Summary: FixedString.h has a workaround for a gcc bug regarding erroneous -Werror=array-bounds errors. This commit extends the workaround to the gcc-5 series, which sadly is still broken. Life gets better with gcc-6. Reviewed By: luciang Differential Revision: D5210633 fbshipit-source-id: 4fcf080d18ddc573636a3e58b61a97167a8c06ce --- diff --git a/folly/FixedString.h b/folly/FixedString.h index a18838b9..935cd821 100644 --- a/folly/FixedString.h +++ b/folly/FixedString.h @@ -120,7 +120,7 @@ enum class Cmp : int { LT = -1, EQ = 0, GT = 1 }; // Rather annoyingly, GCC's -Warray-bounds warning issues false positives for // this code. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61971 -#if defined(__GNUC__) && !defined(__CLANG__) && __GNUC__ <= 4 +#if defined(__GNUC__) && !defined(__CLANG__) && __GNUC__ <= 5 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" #endif