I have been trying to (re-)build the repository HEAD in recent GCC version.
$ gcc --version
gcc (GCC) 12.0.1 20220205 (Red Hat 12.0.1-0)
There are some warnings during build:
echo " Compiling ustring.cc ..."
Compiling ustring.cc ...
g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -MMD -MT "ustring.s .o/ustring.o" -o .o/ustring.o -c ustring.cc
ustring.cc: In member function 'ustl::string::read(ustl::istream&)':
ustring.cc:360:44: warning: 'szbuf' may be used uninitialized [-Wmaybe-uninitialized]
360 | size_t szsz (Utf8SequenceBytes (szbuf[0]) - 1), n = 0;
| ~~~~~~~^
ustring.cc:358:10: note: 'szbuf' declared here
358 | char szbuf [8];
| ^~~~~
echo " Compiling ustdxept.cc ..."
Compiling ustdxept.cc ...
g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -MMD -MT "ustdxept.s .o/ustdxept.o" -o .o/ustdxept.o -c ustdxept.cc
ustdxept.cc: In member function 'ustl::file_exception::file_exception(char const*, char const*)':
ustdxept.cc:104:17: warning: 'strncpy' specified bound 4096 equals destination size [-Wstringop-truncation]
104 | strncpy (_filename, filename, VectorSize(_filename));
| ^
echo "Linking libustl.a ..."
Linking libustl.a ...
And a build error in testing suite:
echo " Compiling test/stdtest.cc ..."
Compiling test/stdtest.cc ...
g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -MMD -MT "test/stdtest.s .o/test/stdtest.o" -o .o/test/stdtest.o -c test/stdtest.cc
test/stdtest.cc: In function 'void InstallCleanupHandlers()':
test/stdtest.cc:55:10: warning: 'void (* std::set_unexpected(unexpected_handler))()' is deprecated [-Wdeprecated-declarations]
55 | std::set_unexpected (OnUnexpected);
| ^~~~~~~~~~~~~~
In file included from test/../utypes.h:34,
from test/../uutility.h:10,
from test/../ualgobase.h:7,
from test/../cmemlink.h:7,
from test/../memlink.h:7,
from test/../memblock.h:7,
from test/../uvector.h:7,
from test/../uspecial.h:7,
from test/stdtest.h:7,
from test/stdtest.cc:9:
/usr/include/c++/12/exception:91:22: note: declared here
91 | unexpected_handler set_unexpected(unexpected_handler) _GLIBCXX_USE_NOEXCEPT;
| ^~~~~~~~~~~~~~
test/stdtest.cc:55:25: warning: 'void (* std::set_unexpected(unexpected_handler))()' is deprecated [-Wdeprecated-declarations]
55 | std::set_unexpected (OnUnexpected);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/12/exception:91:22: note: declared here
91 | unexpected_handler set_unexpected(unexpected_handler) _GLIBCXX_USE_NOEXCEPT;
| ^~~~~~~~~~~~~~
Linking .o/test/algos ...
echo " Compiling test/array.cc ..."
Compiling test/array.cc ...
g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -MMD -MT "test/array.s .o/test/array.o" -o .o/test/array.o -c test/array.cc
Linking .o/test/array ...
ualgobase.cc: Assembler messages:
ualgobase.cc:175: Error: operand type mismatch for `movd'
ualgobase.cc:169: Error: operand type mismatch for `movd'
make[1]: *** [/tmp/ccFApUSl.mk:2: /tmp/ccV0kgtt.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [test/Module.mk:33: .o/test/array] Error 1
bug