diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-11-22 15:18:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-11-22 15:18:43 +0000 |
commit | 9e951dd6644df130b05acf0f05abacd250c039f7 (patch) | |
tree | 4c448aeb459de1dd42b469ffad9a1056ff8215cd /gcc | |
parent | 543382b75ef46abecbcfae946729534ed0821279 (diff) | |
download | gcc-9e951dd6644df130b05acf0f05abacd250c039f7.zip gcc-9e951dd6644df130b05acf0f05abacd250c039f7.tar.gz gcc-9e951dd6644df130b05acf0f05abacd250c039f7.tar.bz2 |
compiler: make comparison operator() methods const
This is required for new versions of libstdc++ in C++17 mode.
Fixes GCC PR 83102.
Reviewed-on: https://go-review.googlesource.com/79396
From-SVN: r255062
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/gogo.h | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/parse.cc | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/parse.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index c0415a6..0bd1dab 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -178c00f929e6268f24f0c9dd9eb69d3d14d8096e +1db7dc97d01ee230ff4874ce1c9775a24ffd16ac The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/gogo.h b/gcc/go/gofrontend/gogo.h index 345a15d..338770f 100644 --- a/gcc/go/gofrontend/gogo.h +++ b/gcc/go/gofrontend/gogo.h @@ -117,7 +117,7 @@ class Import_init // For sorting purposes. struct Import_init_lt { - bool operator()(const Import_init* i1, const Import_init* i2) + bool operator()(const Import_init* i1, const Import_init* i2) const { return i1->init_name() < i2->init_name(); } diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc index 28b1772..f7d53af 100644 --- a/gcc/go/gofrontend/parse.cc +++ b/gcc/go/gofrontend/parse.cc @@ -20,7 +20,7 @@ bool Parse::Enclosing_var_comparison::operator()(const Enclosing_var& v1, - const Enclosing_var& v2) + const Enclosing_var& v2) const { if (v1.var() == v2.var()) return false; diff --git a/gcc/go/gofrontend/parse.h b/gcc/go/gofrontend/parse.h index e416072..2ba8457 100644 --- a/gcc/go/gofrontend/parse.h +++ b/gcc/go/gofrontend/parse.h @@ -127,7 +127,7 @@ class Parse struct Enclosing_var_comparison { bool - operator()(const Enclosing_var&, const Enclosing_var&); + operator()(const Enclosing_var&, const Enclosing_var&) const; }; // A set of Enclosing_var entries. |