google / benchmark

A microbenchmark support library
Apache License 2.0
8.93k stars 1.62k forks source link

[BUG] 1.8.3: build fails with gcc 14.x #1745

Closed kloczek closed 8 months ago

kloczek commented 8 months ago

Looks like last version build fails with latest gcc 14.x which is now used in fedora rawhide.

Build fails with ```console [ 79%] Building CXX object test/CMakeFiles/cxx03_test.dir/cxx03_test.cc.o cd /home/tkloczko/rpmbuild/BUILD/benchmark-1.8.3/x86_64-redhat-linux-gnu/test && /usr/bin/g++ -DHAVE_POSIX_REGEX -DHAVE_PTHREAD_AFFINITY -DHAVE_STD_REGEX -DHAVE_STEADY_CLOCK -DTEST_BENCHMARK_LIBRARY_HAS_NO_ASSERTIONS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/tkloczko/rpmbuild/BUILD/benchmark-1.8.3/include -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -Wall -Wextra -Wshadow -Wfloat-equal -Wold-style-cast -Werror -pedantic -pedantic-errors -fstrict-aliasing -Wno-deprecated-declarations -Wno-deprecated -Wstrict-aliasing -Wno-unused-variable -std=c++98 -fvisibility=hidden -fvisibility-inlines-hidden -UNDEBUG -MD -MT test/CMakeFiles/cxx03_test.dir/cxx03_test.cc.o -MF CMakeFiles/cxx03_test.dir/cxx03_test.cc.o.d -o CMakeFiles/cxx03_test.dir/cxx03_test.cc.o -c /home/tkloczko/rpmbuild/BUILD/benchmark-1.8.3/test/cxx03_test.cc /home/tkloczko/rpmbuild/BUILD/benchmark-1.8.3/test/cxx03_test.cc: error: -Wno-implicit-int detected - is this intentional ? [-Werror] /home/tkloczko/rpmbuild/BUILD/benchmark-1.8.3/test/cxx03_test.cc: error: -Wno-implicit-function-declaration detected - is this intentional ? [-Werror] cc1plus: all warnings being treated as errors make[2]: *** [test/CMakeFiles/cxx03_test.dir/build.make:79: test/CMakeFiles/cxx03_test.dir/cxx03_test.cc.o] Error 1 ```
LebedevRI commented 8 months ago

I have absolutely zero clue what those diagnostics are supposed to mean. Are you sure it's gcc who is issuing them, and not some fedora packaging script?

LebedevRI commented 8 months ago

I'd strongly suggest you report this to your distributions bugtracker, and assign to gcc maintainers.

kloczek commented 8 months ago

I'd strongly suggest you report this to your distributions bugtracker, and assign to gcc maintainers.

Dis you try to reproduce this issue? 🤔

LebedevRI commented 8 months ago

It does not reproduce for me on debian sid's gcc-14. Regardless, that "diagnostic" is less than stellar and has no place being in a production compiler.