Index: url/url_canon_ip.cc |
diff --git a/url/url_canon_ip.cc b/url/url_canon_ip.cc |
index ee701652bcdfc7e36d8ed843f8c606dda0f9f87f..45f95de0d474bf16a2a64cb928ba0c8517b0b1a3 100644 |
--- a/url/url_canon_ip.cc |
+++ b/url/url_canon_ip.cc |
@@ -205,12 +205,12 @@ CanonHostInfo::Family DoIPv4AddressToNumber(const CHAR* spec, |
// Next, consume the last component to fill in the remaining bytes. |
// Work around a gcc 4.9 bug. crbug.com/392872 |
-#if defined(__GNUC__) |
+#if ((__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4) |
#pragma GCC diagnostic push |
#pragma GCC diagnostic ignored "-Warray-bounds" |
#endif |
uint32 last_value = component_values[existing_components - 1]; |
-#if defined(__GNUC__) |
+#if ((__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4) |
#pragma GCC diagnostic pop |
#endif |
for (int i = 3; i >= existing_components - 1; i--) { |