public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Nils-Christian Kempke <nils-christian.kempke@intel.com>,
	gdb-patches@sourceware.org
Cc: tom@tromey.com
Subject: Re: [PATCH 1/4] gdb, testsuite: handle icc and icpc deprecated remarks
Date: Mon, 26 Sep 2022 10:32:47 -0400	[thread overview]
Message-ID: <458aa81c-26a0-9a43-7ee2-32923979c5b4@simark.ca> (raw)
In-Reply-To: <20220920072629.2736207-2-nils-christian.kempke@intel.com>



On 2022-09-20 03:26, Nils-Christian Kempke via Gdb-patches wrote:
> Starting with icc/icpc version 2021.7.0 and higher both compilers emit a
> deprecation remark when used.  E.g.
> 
>   >> icc --version
>   icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is
>   deprecated and will be removed from product release in the second half
>   of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended
>   compiler moving forward. Please transition to use this compiler. Use
>   '-diag-disable=10441' to disable this message.
>   icc (ICC) 2021.7.0 20220713
>   Copyright (C) 1985-2022 Intel Corporation.  All rights reserved.
> 
>   >> icpc --version
>   icpc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is
>   deprecated ...
>   icpc (ICC) 2021.7.0 20220720
>   Copyright (C) 1985-2022 Intel Corporation.  All rights reserved.
> 
> As the testsuite compile fails when unexpected output by the compiler is
> seen this change in the compiler breaks all existing icc and icpc tests.
> This patch makes the gdb testsuite more forgiving by a) allowing the
> output of the remark when trying to figure out the compiler version
> and by b) adding '-diag-disable=10441' to the compile command whenever
> gdb_compile is called without the intention to detect the compiler.
> 
> gdb/testsuite/ChangeLog:
> 2022-07-20  Nils-Christian Kempke  <nils-christian.kempke@intel.com>
> 
> 	* lib/gdb.exp: Handle icc/icpc deprecation warnings.
> 
> Signed-off-by: Nils-Christian Kempke <nils-christian.kempke@intel.com>
> ---
>  gdb/testsuite/lib/gdb.exp | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index 0f6bb20b49c..e6053d7dc4e 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -4493,6 +4493,13 @@ proc gdb_compile {source dest type options} {
>  	}
>      }
>  
> +    # Starting with 2021.7.0 (recognized as icc-20-21-7 by GDB) icc and icpc
> +    # are marked as deprecated and both compilers emit the remark #10441.  To
> +    # let GDB still compile successfully, we disable these warnings here.
> +    if {!$getting_compiler_info && [test_compiler_info {icc-20-21-[7-9]}]} {
> +	lappend new_options "additional_flags=-diag-disable=10441"
> +    }
> +
>      # Treating .c input files as C++ is deprecated in Clang, so
>      # explicitly force C++ language.
>      if { !$getting_compiler_info
> @@ -4749,6 +4756,17 @@ proc gdb_compile {source dest type options} {
>      # Prune uninteresting compiler (and linker) output.
>      regsub "Creating library file: \[^\r\n\]*\[\r\n\]+" $result "" result
>  
> +    # Starting with 2021.7.0 icc and icpc are marked as deprecated and both
> +    # compilers emit a remark #10441.  To let GDB still compile successfully,
> +    # we disable these warnings.  When $getting_compiler_info is true however,
> +    # we do not yet know the compiler (nor its version) and instead prune these
> +    # lines from the compiler output to let the get_compiler_info pass.
> +    if {$getting_compiler_info} {
> +	regsub \
> +	    "(icc|icpc): remark #10441: The Intel\\(R\\) C\\+\\+ Compiler Classic \\(ICC\\) is deprecated\[^\r\n\]*" \
> +	    "$result" "" result
> +    }
> +
>      regsub "\[\r\n\]*$" "$result" "" result
>      regsub "^\[\r\n\]*" "$result" "" result
>      

Thanks, this is OK.

Simon

  reply	other threads:[~2022-09-26 14:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20  7:26 [PATCH 0/4] Dynamic properties of pointers Nils-Christian Kempke
2022-09-20  7:26 ` [PATCH 1/4] gdb, testsuite: handle icc and icpc deprecated remarks Nils-Christian Kempke
2022-09-26 14:32   ` Simon Marchi [this message]
2022-09-20  7:26 ` [PATCH 2/4] gdb/types: Resolve pointer types dynamically Nils-Christian Kempke
2022-09-26 15:33   ` Simon Marchi
2022-09-29 12:39     ` Kempke, Nils-Christian
2022-09-20  7:26 ` [PATCH 3/4] gdb, typeprint: fix pointer/reference typeprint for icc/ifort Nils-Christian Kempke
2022-09-26 16:02   ` Simon Marchi
2022-09-26 17:18     ` Kempke, Nils-Christian
2022-09-27  9:14       ` Zaric, Zoran (Zare)
2022-09-27 12:48         ` Simon Marchi
2022-09-20  7:26 ` [PATCH 4/4] gdb/fortran: Fix sizeof intrinsic for Fortran Nils-Christian Kempke
2022-09-26 17:06   ` Simon Marchi
2022-09-26 17:22     ` Kempke, Nils-Christian
2022-09-26 17:24     ` Kempke, Nils-Christian

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=458aa81c-26a0-9a43-7ee2-32923979c5b4@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=nils-christian.kempke@intel.com \
    --cc=tom@tromey.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).