foonathan / memory

STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

Home Page:https://memory.foonathan.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MinGW build fails due to "#warning"

burnpanck opened this issue · comments

temporary_allocator.cpp contains a check for __MINGW64__ to decide whether or not to use temporary_stack_initializer.
If it does decide to use it, it emits a #warning. However, the file is compiled with -Werror -Wall, making this warning effectively an error. Furthermore, -Wno-error=cpp will probably not work, because GCC emits another warning ("#warning is a GCC extension", which is enabled by -pedantic and cannot be silenced independently).

To make this work, one would probably have to either remove the #warning or disable -Werror for that source file.
However, glancing over the comments on the issues that seem to be requiring this temporary_stack_initializer in the first place, it appears that this bug may have been fixed a few years ago:

Thus, potentially, the check could be removed completely.

Thanks, I've removed the checks.