GCC-9 continues the development track started with GCC-8
producing more warnings and errors about possible code issues
which Squid use of "-Wall -Werror" turns into hard build
failures:
error: ‘strncpy’ output may be truncated copying 6 bytes from a
string of length 6 [-Werror=stringop-truncation]
error: ‘%s’ directive argument is null
[-Werror=format-overflow=]
error: ‘void* memset(void*, int, size_t)’ clearing an object of
type ... with no trivial copy-assignment; use assignment or
value-initialization instead [-Werror=class-memaccess]
error: ‘void* memset(void*, int, size_t)’ clearing an object of
non-trivial type ...; use assignment or value-initialization
instead [-Werror=class-memaccess]
Also, segmentation faults with minimal builds have been
identified as std::string template differences between
optimized and non-optimized object binaries. This results in
cppunit (built with optimizations) crashing unit tests when
freeing memory. Workaround that temporarily by removing the use
of --disable-optimizations from minimal builds.