[PATCH v2 1/2] gdb, testsuite: Enable testcases that suppress specific warnings, for icc/icx.
Felix Willgerodt
felix.willgerodt@intel.com
Mon Jul 25 11:38:21 GMT 2022
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.
---
gdb/testsuite/lib/gdb.exp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index a8f25b5f0dd..1d4ac75016e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4484,9 +4484,13 @@ proc gdb_compile {source dest type options} {
&& [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
--
2.34.3
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list