ridiculousfish / libdivide

Official git repository for libdivide: optimized integer division
http://libdivide.com
Other
1.1k stars 79 forks source link

AVR microcontroller test is broken #116

Closed kimwalisch closed 3 months ago

kimwalisch commented 3 months ago

@sharkautarch: Your commit https://github.com/ridiculousfish/libdivide/commit/b9c0dd16e4da05478b42ff32b40c53953e375856 introduced std::nullptr_t into the libdivide code base which broke the AVR microcontroller test: https://ci.appveyor.com/project/ridiculousfish/libdivide/builds/50312390/job/gk3gt76lhljc40kp. The AVR tests fails because the header <cstddef> is not available.

I don't have any knowledge of AVR microcontrollers but it looks like we have to avoid using any features of the C++ standard library in order to make libdivide compatible with AVR microcontrollers.

Hence it looks like we have 2 options for fixing this issue:

1) Find a workaround for std::nullptr_t. Maybe we can simply use void*? 2) Improve the AVR test (appveyor.yml - Visual Studio 2019 x64). Maybe upgrading to a recent MSVC version would fix the issue.

@adbancroft: Maybe you know how to best fix this issue (since you added support for AVR to libdivide)?

kimwalisch commented 3 months ago

I now switched to using decltype(nullptr) (which does not require including <cstddef>) instead of std::nullptr_t.

sharkautarch commented 3 months ago

@kimwalisch yeah good idea

let me know if there's any further issues