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.
https://memory.foonathan.net
zlib License
1.48k stars 189 forks source link

MinGW build fails due to "#warning" #167

Closed burnpanck closed 1 year ago

burnpanck commented 1 year ago

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.

foonathan commented 1 year ago

Thanks, I've removed the checks.