aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/lex.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2011-04-21 22:54:23 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-04-21 22:54:23 +0000
commit26409c5246d31c7709ea85e8fea698d38bfb161d (patch)
tree333b76ad2a9f76196ed6057be0e17646cc4eddd5 /gcc/go/gofrontend/lex.cc
parent3a6448ea919d0118ae5f4b65121e2d2042b917c7 (diff)
downloadgcc-26409c5246d31c7709ea85e8fea698d38bfb161d.zip
gcc-26409c5246d31c7709ea85e8fea698d38bfb161d.tar.gz
gcc-26409c5246d31c7709ea85e8fea698d38bfb161d.tar.bz2
Define go_assert to replace gcc_assert
This is defined in go-system.h in the backend. * go-system.h (go_assert, go_unreachable): Define. From-SVN: r172846
Diffstat (limited to 'gcc/go/gofrontend/lex.cc')
-rw-r--r--gcc/go/gofrontend/lex.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/go/gofrontend/lex.cc b/gcc/go/gofrontend/lex.cc
index 90b41ea..ce68582 100644
--- a/gcc/go/gofrontend/lex.cc
+++ b/gcc/go/gofrontend/lex.cc
@@ -132,9 +132,9 @@ Keywords::keyword_to_code(const char* keyword, size_t len) const
const char*
Keywords::keyword_to_string(Keyword code) const
{
- gcc_assert(code > KEYWORD_INVALID && code < this->count_);
+ go_assert(code > KEYWORD_INVALID && code < this->count_);
const Mapping* map = &this->mapping_[code];
- gcc_assert(map->keycode == code);
+ go_assert(map->keycode == code);
return map->keystring;
}
@@ -1005,7 +1005,7 @@ Lex::gather_number()
std::string s(pnum, p - pnum);
mpz_t val;
int r = mpz_init_set_str(val, s.c_str(), base);
- gcc_assert(r == 0);
+ go_assert(r == 0);
if (neg)
mpz_neg(val, val);
@@ -1029,7 +1029,7 @@ Lex::gather_number()
std::string s(pnum, p - pnum);
mpz_t val;
int r = mpz_init_set_str(val, s.c_str(), 10);
- gcc_assert(r == 0);
+ go_assert(r == 0);
if (neg)
mpz_neg(val, val);
@@ -1076,7 +1076,7 @@ Lex::gather_number()
std::string s(pnum, p - pnum);
mpfr_t val;
int r = mpfr_init_set_str(val, s.c_str(), 10, GMP_RNDN);
- gcc_assert(r == 0);
+ go_assert(r == 0);
if (neg)
mpfr_neg(val, val, GMP_RNDN);