topepo / C5.0

An R package for fitting Quinlan's C5.0 classification model
https://topepo.github.io/C5.0/
50 stars 20 forks source link

Switch `Confidence` from `float` to `double` to align with `global.c` #35

Closed DavisVaughan closed 3 years ago

DavisVaughan commented 3 years ago

This should fix this LTO warning

extern.h:72:14: warning: type of 'Confidence' does not match original declaration [-Wlto-type-mismatch]
   72 | extern float Confidence, SampleFrac, *Vote, *BVoteBlock, **MCost, **NCost,
      |              ^
global.c:138:8: note: type 'double' should match type 'float'
  138 | double Confidence; /* set by classify() */
      |        ^
global.c:138:8: note: 'Confidence' was previously declared here
global.c:138:8: note: code may be misoptimized unless '-fno-strict-aliasing' is used

It looks like it was supposed to be a double based on its usage in classify.c