fschopp/madlib — pull request #3 by fschopp (2012-06-05 20:49:38+00:00)
Title: Warnings integrate

C++ Code: Eliminated all -Wconversion warnings, a few code improvements as a result
C++ code: Fixed warnings about breaking strict aliasing rules
Legacy Sparse Vectors: Cut SparseData.h down to only contain declarations

Jira: MADLIB-510, MADLIB-531

Build system:
- Path to Boost is now a system path (to avoid warnings)
- Added "-fdiagnostics-show-option -Wconversion" options to C++ source code

Logistic regression:
- Added protection against oversized independent-variable arrays

Student's t probability function:
- Added checks for negative degrees of freedom

Discrete probability functions:
- Changed arguments to 32-bit integers, so that arguments can be losslessly converted to double, which Boost operates with.

Hypothesis tests:
- Changed API for one_way_anova to match internal data types

C++ AL:
- utils::MutableReference: deleted operator T&(), which was causing unclear conversion sequences. References cab now be obtained using the ref() method.
- Used size_t and ptrdiff_t types where appropriate

Modules:
- Made several type casts explicit

Build system:
- Option "-fstrict-aliasing" is now always turned on, so that warnings are more likely to be raised also during debug builds

C++ AL:
- In SystemInforation:: getSystemInformationAndMemoryContext(), void** was reinterpreted as SystemInformation** and caused a warning about breaking strict aliasing rules. The new implementation does not need a reinterpret_cast.

Made sparse-vector headers more suitable for inclusion by C++ code:
- Removed all implementation from SparseData.h and moved it to SparseData.c. This seems more appropriate and also fixed all warnings in C++ code.
- Special values were initialized by aliasing a double array to an int64 array. This is not compliant with strict aliasing rules, and we use a union now.