0ad/source/third_party
Ralph Sennhauser 9a43c43a33
Avoid gcc warning in json_spirit
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>
2025-02-19 21:52:50 +01:00
..
encryption Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
glad Improve script generating glad headers 2024-11-06 16:35:57 +01:00
jsonspirit Avoid gcc warning in json_spirit 2025-02-19 21:52:50 +01:00
mikktspace Remove unused variables 2024-09-28 21:55:30 +02:00
mongoose Silence maybe-uninitialized warning in mongoose 2025-01-05 15:30:41 +01:00
ogre3d_preprocessor Replace FALLTHROUGH by the standard attribute 2025-01-29 19:34:12 +01:00
tinygettext Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
vma Switches VMA to Vulkan 1.1. 2023-03-11 19:12:54 +00:00