Upon further inspection, this is not related to aligned_alloc per se. The problem lies with _aligned_malloc in windows.cfg, and the warning goes away when I specify --platform=unix64. I don't think the code would compile if there were two _aligned_malloc() in the global namespace, i.e. on Windows. So not a bug imho.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The following example causes the wrong "Mismatching allocation and deallocation" warning
I can reproduce this with v2.3. Using free() with aligned_alloc() seems to be correct: https://en.cppreference.com/w/c/memory/aligned_alloc
Upon further inspection, this is not related to aligned_alloc per se. The problem lies with
_aligned_malloc
in windows.cfg, and the warning goes away when I specify--platform=unix64
. I don't think the code would compile if there were two_aligned_malloc()
in the global namespace, i.e. on Windows. So not a bug imho.