2011-10-08 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / libgo / runtime / go-type-error.c
blob865850c9ca0f0949fa5682590a39cbea00557967
1 /* go-type-error.c -- invalid hash and equality functions.
3 Copyright 2009 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
7 #include "go-type.h"
8 #include "go-panic.h"
10 /* A hash function used for a type which does not support hash
11 functions. */
13 size_t
14 __go_type_hash_error (const void *val __attribute__ ((unused)),
15 size_t key_size __attribute__ ((unused)))
17 __go_panic_msg ("hash of unhashable type");
20 /* An equality function for an interface. */
22 _Bool
23 __go_type_equal_error (const void *v1 __attribute__ ((unused)),
24 const void *v2 __attribute__ ((unused)),
25 size_t key_size __attribute__ ((unused)))
27 __go_panic_msg ("comparing uncomparable types");