Tags: dcleblanc/SafeInt
Tags
Strict warnings (#54) * Change inline to static inline in order to accomodate misbehaved compilers. * Compile with clang using -Weverything, fix a bunch of picky warnings. * Fix errors on Windows test build resulting from seemingly benign changes on Linux. * Now that MSVC has thrown a major fit over casting literals, forcing fixes, we can re-enable the clang warning. * Clang and MSVC having conflicts * clang and MSVC now agree, TODO - write an app to nicely format and cast the test cases so they work. * Having a compiler food fight between Apple, MSVC and clang... --------- Co-authored-by: David LeBlanc <[email protected]>
Cpp 98 (#45) * Attempt to remove C++ 11 requirement * Fix cmake files to support compiling without a standard version set * Fix warning in test file * Rearrange and clean up very messy exception handling code, add new option to disallow anything platform-specific * Implement nodiscard, also remove outdated help * Update helpfile * Add more compile time checks, compilation fixes. * Fixes for clang build * Add -Wextra to compile test * Add more test compile cases, div and sub remaiing * Tidy up some warnings from a new MSVC compiler found while using the Cmake build * Fix warnings from clang with -Wextra, also add compilation target for C++17 Co-authored-by: David LeBlanc <[email protected]>
Safe math c (#42) * Switch to CMake, enable build of gcc and clang with one build, set up tests * Fix -fsanitize to the extent possible, works for clang++ * Add C library, initial check-in * Add remaining files * Add addition coverage for built in types * Fix various warnings * Add addition functions that return a bool * First 4 multiplication * Add checked multiplication * Checked dividion * checked subtraction * First half of addition testing * Add in missing addition test cases * Add signed int32, unsigned 32 and 64 cases * Full coverage of 32 and 64-bit addition test cases * Addition tests complete and passing * Initial multiplication tests, refactor to maintain just one test array across both C and C++ libraries, starting with multiplication. * uint32 multiplication complete * Complete multiplicatoin test coverage, refactor and templatize multiplication tests to reduce boilerplate code. * Extract test case from multiplication checks * Factor out test cases into independent file * Division tests complete for C library * Factor out subtraction test cases, templatize existing test cases * Subtraction tests for C complete and verified against SafeInt * Templatize addition checks, factor out test cases * Refactor * Standardize addition test cases * Quench warnings, add licencing * Fixes to make clang happy on Linux, add new code to cmake * Fix gcc makefile, update readme.md * Changes needed to compile cleanly under clang -Weverything * Change error messaging to allow for easier debugging. * Fix interesting int crash, add compile time test, fix warnings Co-authored-by: David LeBlanc <[email protected]>
PreviousNext