What | Removed | Added |
---|---|---|
CC | idonmez@suse.com |
(In reply to Martin Li������ka from comment #0) > The package fails here: > https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging: > Gcc7/spirv-tools/standard/x86_64 > > due to: > [ 18s] In function 'char* strncpy(char*, const char*, size_t)', > [ 18s] inlined from 'spv_diagnostic_t* > spvDiagnosticCreate(spv_position, const char*)' at > /home/abuild/rpmbuild/BUILD/SPIRV-Tools-2020.6/source/diagnostic.cpp:40:10: > [ 18s] /usr/include/bits/string_fortified.h:106:34: error: 'char* > __builtin_strncpy(char*, const char*, long unsigned int)' specified bound > depends on the length of the source argument [-Werror=stringop-overflow=] > [ 18s] 106 | return __builtin___strncpy_chk (__dest, __src, __len, > __bos (__dest)); > [ 18s] | > ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > [ 18s] > /home/abuild/rpmbuild/BUILD/SPIRV-Tools-2020.6/source/diagnostic.cpp: In > function 'spv_diagnostic_t* spvDiagnosticCreate(spv_position, const char*)': > [ 18s] > /home/abuild/rpmbuild/BUILD/SPIRV-Tools-2020.6/source/diagnostic.cpp:31:25: > note: length computed here > [ 18s] 31 | size_t length = strlen(message) + 1; > [ 18s] | ~~~~~~^~~~~~~~~ > [ 18s] cc1plus: all warnings being treated as errors strncpy works as intended here, this is a gcc bug https://gcc.gnu.org/bugzilla//show_bug.cgi?id=88059