CBackend uses aligned_alloc, which requires C++17
backends/cbackend.py generates code that contains aligned_alloc
. This is incompatible with our default compiler flags, which include -std=c++11
. It is also incompatible with Walberla, which defaults to C++14. I guess GCC doesn't care, but I've seen the issue come up with the latest Apple Clang, which interprets the standard more strictly than it used to.
We need to fall back to posix_memalign
on POSIX and _aligned_malloc
on Windows.