Noticed build failure on today's gcc-master from r15-4191-g821d56100e1110: I suspect r15-4191-g821d56100e1110 to be a culprit. /tmp/gb/./prev-gcc/xg++ -B/tmp/gb/./prev-gcc/ -B/usr/local/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -I/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/include -I/home/slyfox/dev/git/gcc/libstdc++-v3/libsupc++ -L/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/slyfox/dev/git/gcc/libcpp -I. -I/home/slyfox/dev/git/gcc/libcpp/../include -I/home/slyfox/dev/git/gcc/libcpp/include -g -O2 -fno-checking -gtoggle -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -Werror -fno-exceptions -fno-rtti -I/home/slyfox/dev/git/gcc/libcpp -I. -I/home/slyfox/dev/git/gcc/libcpp/../include -I/home/slyfox/dev/git/gcc/libcpp/include -c -o directives.o -MT directives.o -MMD -MP -MF .deps/directives.Tpo /home/slyfox/dev/git/gcc/libcpp/directives.cc /home/slyfox/dev/git/gcc/libcpp/directives.cc: In function 'void do_pragma_once(cpp_reader*)': /home/slyfox/dev/git/gcc/libcpp/directives.cc:2078:20: error: unknown conversion type character '<' in format [-Werror=format=] 2078 | "%<#pragma once%> in main file"); | ^ /home/slyfox/dev/git/gcc/libcpp/directives.cc:2078:34: error: unknown conversion type character '>' in format [-Werror=format=] 2078 | "%<#pragma once%> in main file"); | ^ $ /tmp/gb/./prev-gcc/xg++ -B/tmp/gb/./prev-gcc/ -v Reading specs from /tmp/gb/./prev-gcc/specs COLLECT_GCC=/tmp/gb/./prev-gcc/xg++ COLLECT_LTO_WRAPPER=/tmp/gb/./prev-gcc/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20241009 (experimental) (GCC)
https://builder.sourceware.org/buildbot/#/changes/63248 "gcc, libcpp: Add warning switch for "#pragma once in main file" [PR89808]" Fails bootstrap as above on arm64, amd64 and riscv.
My https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662960.html patch hasn't been reviewed yet, with that it would just work, without it we need to (hopefully temporarily) use ' instead of %< and %>
(In reply to Jakub Jelinek from comment #2) > My https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662960.html > patch hasn't been reviewed yet, with that it would just work, without it we > need to (hopefully temporarily) use ' instead of %< and %> I'll soon update the code to use ' instead for now, thank you.
The master branch has been updated by Ken Matsui <kmatsui@gcc.gnu.org>: https://gcc.gnu.org/g:f709990333597b30dff54876bfdaada14e9cde30 commit r15-4199-gf709990333597b30dff54876bfdaada14e9cde30 Author: Ken Matsui <kmatsui@gcc.gnu.org> Date: Wed Oct 9 07:32:20 2024 -0400 libcpp: Use ' instead of %< and %> [PR117039] PR bootstrap/117039 libcpp/ChangeLog: * directives.cc (do_pragma_once): Use ' instead of %< and %>. Signed-off-by: Ken Matsui <kmatsui@gcc.gnu.org>
Thank you for your report. Addressed in https://gcc.gnu.org/g:f709990333597b30dff54876bfdaada14e9cde30.
The change fixed the build for my environment as well. Thank you!