From 03435d981d89fb047b2343ba166f5daa9a3261b9 Mon Sep 17 00:00:00 2001 From: Tim Keith Date: Wed, 10 Oct 2018 07:24:27 -0700 Subject: [PATCH] [flang] Use fundamental types in overloadings of Unparse. Different systems map std::size_t, string::size_type, etc. to different fundamental types. To ensure they are all covered, make the overloadings of Unparse for integer types use only fundamental types. This fixes compilations problems on Darwin and *BSD systems. Original-commit: flang-compiler/f18@5576ed49a2ebe4bfae4a53772a6e0a0d98c18fa0 Reviewed-on: https://github.com/flang-compiler/f18/pull/205 --- flang/lib/parser/unparse.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flang/lib/parser/unparse.cc b/flang/lib/parser/unparse.cc index 7c49b6e..ede1fc2 100644 --- a/flang/lib/parser/unparse.cc +++ b/flang/lib/parser/unparse.cc @@ -62,8 +62,11 @@ public: // Emit simple types as-is. void Unparse(const std::string &x) { Put(x); } void Unparse(int x) { Put(std::to_string(x)); } - void Unparse(std::uint64_t x) { Put(std::to_string(x)); } - void Unparse(std::int64_t x) { Put(std::to_string(x)); } + void Unparse(unsigned int x) { Put(std::to_string(x)); } + void Unparse(long x) { Put(std::to_string(x)); } + void Unparse(unsigned long x) { Put(std::to_string(x)); } + void Unparse(long long x) { Put(std::to_string(x)); } + void Unparse(unsigned long long x) { Put(std::to_string(x)); } void Unparse(char x) { Put(x); } // Statement labels and ends of lines -- 2.7.4