summaryrefslogtreecommitdiffstats
path: root/url
diff options
context:
space:
mode:
Diffstat (limited to 'url')
-rw-r--r--url/url_canon_ip.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/url/url_canon_ip.cc b/url/url_canon_ip.cc
index ee70165..45f95de 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--) {