/in/foo.cc:7:10: error: 'Long y0' redeclared as different kind of symbol
Long x0, y0;
^~
In file included from /usr/include/features.h:364:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507,
from /usr/include/c++/6/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:33,
from /in/foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:250:1: note: previous declaration 'double y0(double)'
__MATHCALL (y0,, (_Mdouble_));
^
/in/foo.cc: In function 'Long gcd(Long, Long)':
/in/foo.cc:13:14: error: assignment of function 'double y0(double)'
y0 = 0;
^
/in/foo.cc:13:14: error: cannot convert 'int' to 'double(double) throw ()' in assignment
/in/foo.cc:18:10: error: invalid conversion from 'double (*)(double) throw ()' to 'Long {aka long long int}' [-fpermissive]
x0 = y0;
^~
/in/foo.cc:19:20: error: invalid operands of types 'Long {aka long long int}' and 'double(double) throw ()' to binary 'operator*'
y0 = t - a / b * y0;
~~~~~~^~~~
/in/foo.cc: In function 'int main(int, char**)':
/in/foo.cc:31:23: error: call of overloaded 'abs(Long)' is ambiguous
Long a = abs(m - n);
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:47,
from /in/foo.cc:1:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
/in/foo.cc:4:13: note: candidate: Long abs(Long)
inline Long abs(Long l) {
^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:47:0,
from /in/foo.cc:1:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:41:0,
from /in/foo.cc:1:
/usr/include/c++/6/cmath:103:5: note: candidate: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = long long int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^~~
/usr/include/c++/6/cmath:95:3: note: candidate: constexpr long double std::abs(long double)
abs(long double __x)
^~~
/usr/include/c++/6/cmath:91:3: note: candidate: constexpr float std::abs(float)
abs(float __x)
^~~
/usr/include/c++/6/cmath:85:3: note: candidate: constexpr double std::abs(double)
abs(double __x)
^~~
/in/foo.cc:43:30: error: call of overloaded 'abs(Long)' is ambiguous
Long add2 = abs(b / d);
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:47,
from /in/foo.cc:1:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
/in/foo.cc:4:13: note: candidate: Long abs(Long)
inline Long abs(Long l) {
^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:47:0,
from /in/foo.cc:1:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:41:0,
from /in/foo.cc:1:
/usr/include/c++/6/cmath:103:5: note: candidate: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = long long int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^~~
/usr/include/c++/6/cmath:95:3: note: candidate: constexpr long double std::abs(long double)
abs(long double __x)
^~~
/usr/include/c++/6/cmath:91:3: note: candidate: constexpr float std::abs(float)
abs(float __x)
^~~
/usr/include/c++/6/cmath:85:3: note: candidate: constexpr double std::abs(double)
abs(double __x)
^~~