marzer / tomlplusplus

Header-only TOML config file parser and serializer for C++17.
https://marzer.github.io/tomlplusplus/
MIT License
1.58k stars 152 forks source link

MinGW: error: requested alignment 32 is larger than 16 #148

Closed chronoxor closed 2 years ago

chronoxor commented 2 years ago
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Check for working C compiler: C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/gcc.exe - skipped
-- Check for working CXX compiler: C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/g++.exe - skipped

D:/a/PrimeTrader/PrimeTrader/modules/tomlplusplus/include/toml++/impl/parser.inl: In member function 'bool toml::v3::impl::utf8_reader<T>::read_next_block()':
D:/a/PrimeTrader/PrimeTrader/modules/tomlplusplus/include/toml++/impl/parser.inl:264:50: error: requested alignment 32 is larger than 16 [-Werror=attributes]
    TOML_OVERALIGNED char raw_bytes[block_capacity];
                                                  ^
D:/a/PrimeTrader/PrimeTrader/modules/tomlplusplus/include/toml++/impl/parser.inl: In function 'toml::v3::ex::parse_result toml::v3::impl::do_parse_file(std::string_view)':
D:/a/PrimeTrader/PrimeTrader/modules/tomlplusplus/include/toml++/impl/parser.inl:3767:58: error: requested alignment 32 is larger than 16 [-Werror=attributes]
[ 77%] Building CXX object CMakeFiles/trader.dir/source/access/endpoints/https_access_client_endpoint.cpp.obj
   TOML_OVERALIGNED char file_buffer[sizeof(void*) * 1024u];
                                                          ^
marzer commented 2 years ago

Thanks for the report + fix!