public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Felix Willgerodt <felix.willgerodt@intel.com>
To: gdb-patches@sourceware.org
Cc: kevinb@redhat.com, aburgess@redhat.com, blarsen@redhat.com,
	Felix Willgerodt <felix.willgerodt@intel.com>
Subject: [PATCH v3 1/2] gdb, testsuite: Enable testcases that suppress specific warnings, for icc/icx.
Date: Wed, 27 Jul 2022 10:51:27 +0200	[thread overview]
Message-ID: <20220727085128.2404513-2-felix.willgerodt@intel.com> (raw)
In-Reply-To: <20220727085128.2404513-1-felix.willgerodt@intel.com>

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


  reply	other threads:[~2022-07-27  8:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27  8:51 [PATCH v3 0/2] Testsuite changes for clang and icc/icx Felix Willgerodt
2022-07-27  8:51 ` Felix Willgerodt [this message]
2022-07-27  8:51 ` [PATCH v3 2/2] gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning Felix Willgerodt
2022-07-27 17:39 ` [PATCH v3 0/2] Testsuite changes for clang and icc/icx Kevin Buettner
2022-08-10  9:10 ` Willgerodt, Felix
2022-08-18  7:54 ` Willgerodt, Felix
2022-08-18 16:34   ` Kevin Buettner
2022-08-19 13:08     ` Willgerodt, Felix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220727085128.2404513-2-felix.willgerodt@intel.com \
    --to=felix.willgerodt@intel.com \
    --cc=aburgess@redhat.com \
    --cc=blarsen@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).