mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-20 15:23:56 -07:00
Gcc-14 triggers a warning for substitute_esc_chars in json_spirit_reader_template.h if optimizations are enabled. ../../../source/third_party/jsonspirit/json_spirit_reader_template.h:138:62: /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/char_traits.h:427:56: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775808 or more bytes at offsets 0 and 0 may overlap up to 9223372036854775809 bytes at offset -1 [-Wrestrict] 427 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); for with lto enabled /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/char_traits.h:427:56: warning: ‘__builtin_memcpy’ specified bound between 9223372036854775808 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 427 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); This looks like another incarnation of bugs like: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366 Add quirk to avoid the warning Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com> |
||
|---|---|---|
| .. | ||
| json_spirit_error_position.h | ||
| json_spirit_reader_template.h | ||
| json_spirit_value.h | ||
| json_spirit_writer_options.h | ||
| json_spirit_writer_template.h | ||
| LICENSE.txt | ||
| README.txt | ||
This separate JSON library is used for Atlas to avoid the SpiderMonkey dependency. SpiderMonkey is a fully featured JS engine and even though we already use it for the main engine, it's too heavy-weight to use it in Atlas. The SpiderMonkey API also changes frequently and we hope that the JSON parsing code needs less changes when we use this separate library. Get the library from here: http://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented The currently used version was released on the 10 of May 2014. Search for this comment in json_spirit_value.h and uncomment the lines we don't need: // comment out the value types you don't need to reduce build times and intermediate file sizes