Library Status: safe_numerics/example

Run Date: 15:12:29 UTC, Saturday 07 November 2020

bin.v2/libs/safe_numerics/example/example91.test/clang-darwin-14/debug/threading-multi/visibility-hidden

Compiler output:

In file included from example91.cpp:47:
./motor1.c:26:1: error: unknown type name 'int16'
int16 motor_pos = 0;    // absolute step number
^
./motor1.c:27:1: error: unknown type name 'int16'
int16 pos_inc=0;        // motor_pos increment
^
./motor1.c:28:1: error: unknown type name 'uint16'
uint16 phase=0;         // ccpPhase[phase_ix]
^
./motor1.c:29:1: error: unknown type name 'uint8'; did you mean 'uint'?
uint8  phase_ix=0;      // index to ccpPhase[]
^~~~~
uint
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:92:33: note: 'uint' declared here
typedef unsigned int            uint;           /* Sys V compatibility */
                                ^
In file included from example91.cpp:47:
./motor1.c:30:1: error: unknown type name 'uint8'; did you mean 'uint'?
uint8  phase_inc;       // phase_ix increment
^~~~~
uint
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:92:33: note: 'uint' declared here
typedef unsigned int            uint;           /* Sys V compatibility */
                                ^
In file included from example91.cpp:47:
./motor1.c:31:1: error: unknown type name 'uint8'; did you mean 'uint'?
uint8  run_flg;         // true while motor is running
^~~~~
uint
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:92:33: note: 'uint' declared here
typedef unsigned int            uint;           /* Sys V compatibility */
                                ^
In file included from example91.cpp:47:
./motor1.c:32:1: error: unknown type name 'uint16'
uint16 ccpr;            // copy of CCPR1&2
^
./motor1.c:33:1: error: unknown type name 'uint16'
uint16 c;               // integer delay count
^
./motor1.c:34:1: error: unknown type name 'uint16'
uint16 step_no;          // progress of move
^
./motor1.c:35:1: error: unknown type name 'uint16'
uint16 step_down;       // start of down-ramp
^
./motor1.c:36:1: error: unknown type name 'uint16'
uint16 move;             // total steps to move
^
./motor1.c:37:1: error: unknown type name 'uint16'
uint16 midpt;           // midpoint of move
^
./motor1.c:38:1: error: unknown type name 'uint32'
uint32 c32;              // 24.8 fixed point delay count
^
./motor1.c:39:1: error: unknown type name 'int16'
int16 denom;            // 4.n+1 in ramp algo
^
./motor1.c:43:1: error: unknown type name 'uint16'
uint16 const ccpPhase[] = {0x909, 0x908, 0x808, 0x809}; // 00,01,11,10
^
./motor1.c:48:1: error: unknown type name 'uint16'
uint16 make16(uint8 l, uint8 r) {
^
./motor1.c:48:15: error: unknown type name 'uint8'; did you mean 'uint'?
uint16 make16(uint8 l, uint8 r) {
              ^~~~~
              uint
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:92:33: note: 'uint' declared here
typedef unsigned int            uint;           /* Sys V compatibility */
                                ^
In file included from example91.cpp:47:
./motor1.c:48:24: error: unknown type name 'uint8'; did you mean 'uint'?
uint16 make16(uint8 l, uint8 r) {
                       ^~~~~
                       uint
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/types.h:92:33: note: 'uint' declared here
typedef unsigned int            uint;           /* Sys V compatibility */
                                ^
In file included from example91.cpp:47:
./motor1.c:49:13: error: use of undeclared identifier 'uint16'
    return (uint16) l << 8 + r;
            ^
./motor1.c:49:28: warning: operator '<<' has lower precedence than '+'; '+' will be evaluated first [-Wshift-op-parentheses]
    return (uint16) l << 8 + r;
                      ~~ ~~^~~
./motor1.c:49:28: note: place parentheses around the '+' expression to silence this warning
    return (uint16) l << 8 + r;
                           ^
                         (    )
./motor1.c:49:23: warning: expression result unused [-Wunused-value]
    return (uint16) l << 8 + r;
                    ~ ^  ~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.

    "clang++" -x c++ -fvisibility-inlines-hidden -std=c++14 -Wall -Wc++0x-narrowing -fPIC -m64 -O0 -fno-inline -Wall -g -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -I"../../.." -c -o "../../../bin.v2/libs/safe_numerics/example/example91.test/clang-darwin-14/debug/threading-multi/visibility-hidden/example91.o" "example91.cpp"

bin.v2/libs/safe_numerics/example/example81.test/clang-darwin-14/debug/threading-multi/visibility-hidden

Compiler output:

In file included from example81.cpp:9:
In file included from ../../../boost/safe_numerics/safe_integer.hpp:15:
In file included from ../../../boost/safe_numerics/safe_base.hpp:17:
../../../boost/safe_numerics/exception_policies.hpp:28:9: error: type 'boost::safe_numerics::trap_exception' does not provide a call operator
        AE()(e, msg);
        ^~~~
../../../boost/safe_numerics/exception_policies.hpp:138:17: note: in instantiation of member function 'boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>::on_arithmetic_error' requested here
            EP::on_arithmetic_error(e, msg);
                ^
../../../boost/safe_numerics/exception_policies.hpp:160:44: note: in instantiation of member function 'boost::safe_numerics::dispatch_switch::dispatch_case<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, boost::safe_numerics::safe_numerics_actions::arithmetic_error>::invoke' requested here
    dispatch_switch::dispatch_case<EP, a>::invoke(E, msg);
                                           ^
../../../boost/safe_numerics/exception_policies.hpp:170:9: note: in instantiation of function template specialization 'boost::safe_numerics::dispatch<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, boost::safe_numerics::safe_numerics_error::positive_overflow_error>' requested here
        dispatch<EP, E>(msg);
        ^
../../../boost/safe_numerics/checked_integer.hpp:68:29: note: in instantiation of function template specialization 'boost::safe_numerics::dispatch_and_return<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, int>::invoke<boost::safe_numerics::safe_numerics_error::positive_overflow_error>' requested here
                F::template invoke<safe_numerics_error::positive_overflow_error>(
                            ^
../../../boost/safe_numerics/checked_integer.hpp:148:31: note: in instantiation of member function 'boost::safe_numerics::heterogeneous_checked_operation<int, -2147483648, 2147483647, int, boost::safe_numerics::dispatch_and_return<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, int>, void>::cast_impl_detail::cast_impl' requested here
            cast_impl_detail::cast_impl(
                              ^
../../../boost/safe_numerics/safe_base_operations.hpp:269:8: note: in instantiation of member function 'boost::safe_numerics::heterogeneous_checked_operation<int, -2147483648, 2147483647, int, boost::safe_numerics::dispatch_and_return<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, int>, void>::cast' requested here
    >::cast(base_value(t));
       ^
../../../boost/safe_numerics/safe_base_operations.hpp:315:65: note: in instantiation of function template specialization 'boost::safe_numerics::casting_helper<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, int, boost::safe_numerics::safe_base<int, -2147483648, 2147483647, boost::safe_numerics::native, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> >, boost::safe_numerics::safe_base<int, -2147483648, 2147483647, boost::safe_numerics::native, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> > >' requested here
        const std::pair<result_base_type, result_base_type> r = casting_helper<
                                                                ^
../../../boost/safe_numerics/safe_base_operations.hpp:380:13: note: in instantiation of member function 'boost::safe_numerics::addition_result<boost::safe_numerics::safe_base<int, -2147483648, 2147483647, boost::safe_numerics::native, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> >, boost::safe_numerics::safe_base<int, -2147483648, 2147483647, boost::safe_numerics::native, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> > >::return_value' requested here
            return_value(
            ^
../../../boost/safe_numerics/safe_base_operations.hpp:396:35: note: in instantiation of member function 'boost::safe_numerics::addition_result<boost::safe_numerics::safe_base<int, -2147483648, 2147483647, boost::safe_numerics::native, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> >, boost::safe_numerics::safe_base<int, -2147483648, 2147483647, boost::safe_numerics::native, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> > >::return_value' requested here
    return addition_result<T, U>::return_value(t, u);
                                  ^
example81.cpp:22:18: note: in instantiation of function template specialization 'boost::safe_numerics::operator+<boost::safe_numerics::safe_base<int, -2147483648, 2147483647, boost::safe_numerics::native, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> >, boost::safe_numerics::safe_base<int, -2147483648, 2147483647, boost::safe_numerics::native, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> > >' requested here
    safe_t z = x + y; // will fail to compile !
                 ^
1 error generated.
(failed-as-expected) ../../../bin.v2/libs/safe_numerics/example/example81.test/clang-darwin-14/debug/threading-multi/visibility-hidden/example81.o

bin.v2/libs/safe_numerics/example/example14.test/clang-darwin-14/debug/threading-multi/visibility-hidden

Compiler output:

example14.cpp:23:24: warning: division by zero is undefined [-Wdivision-by-zero]
        std::cout << x / y; // will display "0"!
                       ^ ~
1 warning generated.

bin.v2/libs/safe_numerics/example/example17.test/clang-darwin-14/debug/threading-multi/visibility-hidden

Compiler output:

In file included from example17.cpp:7:
In file included from ../../../boost/safe_numerics/safe_integer.hpp:15:
In file included from ../../../boost/safe_numerics/safe_base.hpp:17:
../../../boost/safe_numerics/exception_policies.hpp:28:9: error: type 'boost::safe_numerics::trap_exception' does not provide a call operator
        AE()(e, msg);
        ^~~~
../../../boost/safe_numerics/exception_policies.hpp:138:17: note: in instantiation of member function 'boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>::on_arithmetic_error' requested here
            EP::on_arithmetic_error(e, msg);
                ^
../../../boost/safe_numerics/exception_policies.hpp:160:44: note: in instantiation of member function 'boost::safe_numerics::dispatch_switch::dispatch_case<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, boost::safe_numerics::safe_numerics_actions::arithmetic_error>::invoke' requested here
    dispatch_switch::dispatch_case<EP, a>::invoke(E, msg);
                                           ^
../../../boost/safe_numerics/exception_policies.hpp:170:9: note: in instantiation of function template specialization 'boost::safe_numerics::dispatch<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, boost::safe_numerics::safe_numerics_error::positive_overflow_error>' requested here
        dispatch<EP, E>(msg);
        ^
../../../boost/safe_numerics/checked_integer.hpp:68:29: note: in instantiation of function template specialization 'boost::safe_numerics::dispatch_and_return<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, int>::invoke<boost::safe_numerics::safe_numerics_error::positive_overflow_error>' requested here
                F::template invoke<safe_numerics_error::positive_overflow_error>(
                            ^
../../../boost/safe_numerics/checked_integer.hpp:148:31: note: in instantiation of member function 'boost::safe_numerics::heterogeneous_checked_operation<int, -2147483648, 2147483647, long, boost::safe_numerics::dispatch_and_return<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, int>, void>::cast_impl_detail::cast_impl' requested here
            cast_impl_detail::cast_impl(
                              ^
../../../boost/safe_numerics/safe_base_operations.hpp:51:16: note: in instantiation of member function 'boost::safe_numerics::heterogeneous_checked_operation<int, -2147483648, 2147483647, long, boost::safe_numerics::dispatch_and_return<boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception>, int>, void>::cast' requested here
            >::cast(t);
               ^
../../../boost/safe_numerics/safe_base_operations.hpp:81:18: note: in instantiation of function template specialization 'boost::safe_numerics::validate_detail<int, -2147483648, 2147483647, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> >::exception_possible::return_value<long>' requested here
        >::type::return_value(t);
                 ^
../../../boost/safe_numerics/safe_base_operations.hpp:169:8: note: in instantiation of function template specialization 'boost::safe_numerics::validate_detail<int, -2147483648, 2147483647, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> >::return_value<long>' requested here
    >::return_value(m_t);
       ^
example17.cpp:20:7: note: in instantiation of function template specialization 'boost::safe_numerics::safe_base<long, -9223372036854775808, 9223372036854775807, boost::safe_numerics::native, boost::safe_numerics::exception_policy<boost::safe_numerics::trap_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception, boost::safe_numerics::ignore_exception> >::operator int<int, 0>' requested here
    f(y);   // could overflow so trap at compile time
      ^
1 error generated.
(failed-as-expected) ../../../bin.v2/libs/safe_numerics/example/example17.test/clang-darwin-14/debug/threading-multi/visibility-hidden/example17.o