1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Description: Work around abs overload changes in gcc 6
In gcc 6, abs(unsigned int&) is illegal. This patch declares local inline
replacements.
.
See https://gcc.gnu.org/gcc-6/porting_to.html
Origin: vendor, http://pkgs.fedoraproject.org/cgit/rpms/octave.git/tree/octave-abs.patch
Forwarded: not-needed
Reviewed-by: Mike Miller <mtmiller@debian.org>
Last-Update: 2016-08-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/libinterp/corefcn/pr-output.cc
+++ b/libinterp/corefcn/pr-output.cc
@@ -3145,6 +3145,14 @@ PRINT_INT_SCALAR_INTERNAL (uint32_t)
PRINT_INT_SCALAR_INTERNAL (int64_t)
PRINT_INT_SCALAR_INTERNAL (uint64_t)
+inline unsigned int abs (unsigned int x) { return x; }
+inline long unsigned int abs (long unsigned int x) { return x; }
+inline long long unsigned int abs (long long unsigned int x) { return x; }
+inline short unsigned int abs (short unsigned int x) { return x; }
+inline unsigned char abs (unsigned char x) { return x; }
+inline signed char abs (signed char x) { return abs((int)x); }
+inline short int abs (short int x) { return abs((int)x); }
+
template <class T>
/* static */ inline void
octave_print_internal_template (std::ostream& os, const intNDArray<T>& nda,
|