From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by sourceware.org (Postfix) with ESMTPS id 193693857012 for ; Wed, 27 Jul 2022 08:53:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 193693857012 X-IronPort-AV: E=McAfee;i="6400,9594,10420"; a="288192962" X-IronPort-AV: E=Sophos;i="5.93,195,1654585200"; d="scan'208";a="288192962" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 01:53:48 -0700 X-IronPort-AV: E=Sophos;i="5.93,195,1654585200"; d="scan'208";a="742576696" Received: from mulvlfelix.iul.intel.com (HELO localhost) ([172.28.48.92]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 01:53:47 -0700 From: Felix Willgerodt To: gdb-patches@sourceware.org Cc: kevinb@redhat.com, aburgess@redhat.com, blarsen@redhat.com, Felix Willgerodt 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 Message-Id: <20220727085128.2404513-2-felix.willgerodt@intel.com> X-Mailer: git-send-email 2.34.3 In-Reply-To: <20220727085128.2404513-1-felix.willgerodt@intel.com> References: <20220727085128.2404513-1-felix.willgerodt@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2022 08:53:51 -0000 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 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