To cite gdb.exp:
Some C/C++ testcases unconditionally pass -Wno-foo as additional
options to disable some warning. That is OK with GCC, because
by design, GCC accepts any -Wno-foo option, even if it doesn't
support -Wfoo. Clang however warns about unknown -Wno-foo by
default, unless you pass -Wno-unknown-warning-option as well.
We do that here, so that individual testcases don't have to
worry about it.
This patch adds the same option that already exists for clang for icx and
adds the equivalent icc option.
&& [lsearch -exact $options rust] == -1
&& [lsearch -exact $options ada] == -1
&& [lsearch -exact $options f90] == -1
- && [lsearch -exact $options go] == -1
- && [test_compiler_info "clang-*"]} {
- lappend new_options "additional_flags=-Wno-unknown-warning-option"
+ && [lsearch -exact $options go] == -1} {
+ if {[test_compiler_info "clang-*"] || [test_compiler_info "icx-*"]} {
+ lappend new_options "additional_flags=-Wno-unknown-warning-option"
+ } elseif {[test_compiler_info "icc-*"]} {
+ # This is the equivalent for the icc compiler.
+ lappend new_options "additional_flags=-diag-disable=10148"
+ }
}
# Treating .c input files as C++ is deprecated in Clang, so