diff options
author | mostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-29 23:56:03 +0000 |
---|---|---|
committer | mostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-29 23:56:03 +0000 |
commit | 85e09da0b056c0c5c0279d0209512c8c206ad237 (patch) | |
tree | 9a4fe2a7ea555f1219123107ce5446fac2a8b7b8 /url | |
parent | f52994be7e00d2a50bbd32aea288ab1f370c883f (diff) | |
download | chromium_src-85e09da0b056c0c5c0279d0209512c8c206ad237.zip chromium_src-85e09da0b056c0c5c0279d0209512c8c206ad237.tar.gz chromium_src-85e09da0b056c0c5c0279d0209512c8c206ad237.tar.bz2 |
use a gcc version check in 4.9 warning workaround
Only disable the spurious warning on versions of GCC that
need it, so we don't hide real warnings or break older
compilers unnecessarily.
Followup from https://codereview.chromium.org/384843002/
BUG=392872
Review URL: https://codereview.chromium.org/413023002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286347 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'url')
-rw-r--r-- | url/url_canon_ip.cc | 4 |
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--) { |