Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1154)

Unified Diff: url/url_canon_ip.cc

Issue 413023002: use a gcc version check in 4.9 warning workaround (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simplify ifdef, pop properly Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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--) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698