re PR go/90669 (go/gofrontend/types.cc:2805 contains range-based ‘for’ loops which...
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 30 May 2019 00:57:11 +0000 (00:57 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 30 May 2019 00:57:11 +0000 (00:57 +0000)
PR go/90669
    compiler: remove range-based 'for' loop

    Fix for GCC PR/90669: remove range-based 'for' loop to preserve
    buildability with g++ version 4.X.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179397

From-SVN: r271761

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/types.cc

index ba9550787afd01e01e18b0fdef8c2bcd7bb7149f..6a291b5402a83fc4b72a974da3ac928e3e324a8b 100644 (file)
@@ -1,4 +1,4 @@
-3995d545f1e112c682753f342eaef0877551a649
+84b8000c32f671c6cc89df1290ed6e0170308644
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index f6c104cef8a23b59669929c7563277ad54ca55d5..1b96dc1a4d839fee6a2c73943aca11a83e96bdb5 100644 (file)
@@ -2802,8 +2802,13 @@ Ptrmask::symname() const
 
       // Redirect the bits vector to the digest, and update the prefix.
       prefix = "X";
-      for (char c : digest)
-        shabits.push_back((unsigned char) c);
+      for (std::string::const_iterator p = digest.begin();
+           p != digest.end();
+           ++p)
+        {
+          unsigned char c = *p;
+          shabits.push_back(c);
+        }
       bits = &shabits;
     }