From 9e0ed736065afad7da7850f508f316f2954d8960 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 27 Feb 2019 04:56:12 +0000 Subject: compiler: check duplicate numeric keys in map literals Updates golang/go#28104 Reviewed-on: https://go-review.googlesource.com/c/162882 From-SVN: r269242 --- gcc/go/gofrontend/expressions.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/go/gofrontend/expressions.h') diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h index 86d950b..5d61b69 100644 --- a/gcc/go/gofrontend/expressions.h +++ b/gcc/go/gofrontend/expressions.h @@ -4163,6 +4163,10 @@ class Numeric_constant Numeric_constant& operator=(const Numeric_constant&); + // Check equality with another numeric constant. + bool + equals(const Numeric_constant&) const; + // Set to an unsigned long value. void set_unsigned_long(Type*, unsigned long); @@ -4282,6 +4286,10 @@ class Numeric_constant Expression* expression(Location) const; + // Calculate a hash code with a given seed. + unsigned int + hash(unsigned int seed) const; + private: void clear(); -- cgit v1.1