public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Testsuite changes for clang and icc/icx
@ 2022-07-27  8:51 Felix Willgerodt
  2022-07-27  8:51 ` [PATCH v3 1/2] gdb, testsuite: Enable testcases that suppress specific warnings, for icc/icx Felix Willgerodt
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Felix Willgerodt @ 2022-07-27  8:51 UTC (permalink / raw)
  To: gdb-patches; +Cc: kevinb, aburgess, blarsen, Felix Willgerodt

V1 was only one patch and can be found here:
https://sourceware.org/pipermail/gdb-patches/2022-June/189903.html
V2 can be found here:
https://sourceware.org/pipermail/gdb-patches/2022-July/191055.html

This series disables some compiler warnings for clang and icc/icx
in the testsuite.

Since V2 I only added a comment to callfuncs.exp, as requested
by Kevin Buettner.

Thanks,
Felix

Felix Willgerodt (2):
  gdb, testsuite: Enable testcases that suppress specific warnings, for
    icc/icx.
  gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning.

 gdb/testsuite/gdb.base/callfuncs.exp |  4 +++-
 gdb/testsuite/lib/gdb.exp            | 10 +++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

-- 
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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 1/2] gdb, testsuite: Enable testcases that suppress specific warnings, for icc/icx.
  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
  2022-07-27  8:51 ` [PATCH v3 2/2] gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning Felix Willgerodt
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Felix Willgerodt @ 2022-07-27  8:51 UTC (permalink / raw)
  To: gdb-patches; +Cc: kevinb, aburgess, blarsen, Felix Willgerodt

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 2/2] gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning.
  2022-07-27  8:51 [PATCH v3 0/2] Testsuite changes for clang and icc/icx Felix Willgerodt
  2022-07-27  8:51 ` [PATCH v3 1/2] gdb, testsuite: Enable testcases that suppress specific warnings, for icc/icx Felix Willgerodt
@ 2022-07-27  8:51 ` Felix Willgerodt
  2022-07-27 17:39 ` [PATCH v3 0/2] Testsuite changes for clang and icc/icx Kevin Buettner
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Felix Willgerodt @ 2022-07-27  8:51 UTC (permalink / raw)
  To: gdb-patches; +Cc: kevinb, aburgess, blarsen, Felix Willgerodt

Clang 15.0.0 enabled the warning for deprecated non-prototype functions
by default: https://reviews.llvm.org/D122895
Callfuncs.exp is impacted and won't run due to new warnings:

callfuncs.c:339:5: warning: a function declaration without a prototype is
deprecated in all versions of C and is not supported in C2x
[-Wdeprecated-non-prototype]
int t_float_values (float_arg1, float_arg2)

This patch disables those warnings with -Wno-deprecated-non-prototype.
Removing the test for deprecated syntax would also be an option. But I will
leave that up for others to decide/implement.
---
 gdb/testsuite/gdb.base/callfuncs.exp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 4448cc127ba..fd63f109101 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -18,7 +18,9 @@
 
 standard_testfile
 
-set compile_flags {debug}
+# We still want to test non-prototype functions for now, which is why
+# we disable compilers warning about them.
+set compile_flags {debug additional_flags=-Wno-deprecated-non-prototype}
 if [support_complex_tests] {
     lappend compile_flags "additional_flags=-DTEST_COMPLEX"
 }
-- 
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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 0/2] Testsuite changes for clang and icc/icx
  2022-07-27  8:51 [PATCH v3 0/2] Testsuite changes for clang and icc/icx Felix Willgerodt
  2022-07-27  8:51 ` [PATCH v3 1/2] gdb, testsuite: Enable testcases that suppress specific warnings, for icc/icx Felix Willgerodt
  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 ` Kevin Buettner
  2022-08-10  9:10 ` Willgerodt, Felix
  2022-08-18  7:54 ` Willgerodt, Felix
  4 siblings, 0 replies; 8+ messages in thread
From: Kevin Buettner @ 2022-07-27 17:39 UTC (permalink / raw)
  To: Felix Willgerodt; +Cc: gdb-patches, aburgess, blarsen

On Wed, 27 Jul 2022 10:51:26 +0200
Felix Willgerodt <felix.willgerodt@intel.com> wrote:

> V1 was only one patch and can be found here:
> https://sourceware.org/pipermail/gdb-patches/2022-June/189903.html
> V2 can be found here:
> https://sourceware.org/pipermail/gdb-patches/2022-July/191055.html
> 
> This series disables some compiler warnings for clang and icc/icx
> in the testsuite.
> 
> Since V2 I only added a comment to callfuncs.exp, as requested
> by Kevin Buettner.
> 
> Thanks,
> Felix
> 
> Felix Willgerodt (2):
>   gdb, testsuite: Enable testcases that suppress specific warnings, for
>     icc/icx.
>   gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning.
> 
>  gdb/testsuite/gdb.base/callfuncs.exp |  4 +++-
>  gdb/testsuite/lib/gdb.exp            | 10 +++++++---
>  2 files changed, 10 insertions(+), 4 deletions(-)

This series looks okay to me.

Kevin


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH v3 0/2] Testsuite changes for clang and icc/icx
  2022-07-27  8:51 [PATCH v3 0/2] Testsuite changes for clang and icc/icx Felix Willgerodt
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 8+ messages in thread
From: Willgerodt, Felix @ 2022-08-10  9:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: kevinb, aburgess, blarsen

Ping!

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix <felix.willgerodt@intel.com>
> Sent: Mittwoch, 27. Juli 2022 10:51
> To: gdb-patches@sourceware.org
> Cc: kevinb@redhat.com; aburgess@redhat.com; blarsen@redhat.com;
> Willgerodt, Felix <felix.willgerodt@intel.com>
> Subject: [PATCH v3 0/2] Testsuite changes for clang and icc/icx
> 
> V1 was only one patch and can be found here:
> https://sourceware.org/pipermail/gdb-patches/2022-June/189903.html
> V2 can be found here:
> https://sourceware.org/pipermail/gdb-patches/2022-July/191055.html
> 
> This series disables some compiler warnings for clang and icc/icx
> in the testsuite.
> 
> Since V2 I only added a comment to callfuncs.exp, as requested
> by Kevin Buettner.
> 
> Thanks,
> Felix
> 
> Felix Willgerodt (2):
>   gdb, testsuite: Enable testcases that suppress specific warnings, for
>     icc/icx.
>   gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning.
> 
>  gdb/testsuite/gdb.base/callfuncs.exp |  4 +++-
>  gdb/testsuite/lib/gdb.exp            | 10 +++++++---
>  2 files changed, 10 insertions(+), 4 deletions(-)
> 
> --
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH v3 0/2] Testsuite changes for clang and icc/icx
  2022-07-27  8:51 [PATCH v3 0/2] Testsuite changes for clang and icc/icx Felix Willgerodt
                   ` (3 preceding siblings ...)
  2022-08-10  9:10 ` Willgerodt, Felix
@ 2022-08-18  7:54 ` Willgerodt, Felix
  2022-08-18 16:34   ` Kevin Buettner
  4 siblings, 1 reply; 8+ messages in thread
From: Willgerodt, Felix @ 2022-08-18  7:54 UTC (permalink / raw)
  To: gdb-patches; +Cc: kevinb, aburgess, blarsen

2. Ping!

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Mittwoch, 10. August 2022 11:11
> To: gdb-patches@sourceware.org
> Cc: kevinb@redhat.com; aburgess@redhat.com; blarsen@redhat.com
> Subject: RE: [PATCH v3 0/2] Testsuite changes for clang and icc/icx
> 
> Ping!
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > Sent: Mittwoch, 27. Juli 2022 10:51
> > To: gdb-patches@sourceware.org
> > Cc: kevinb@redhat.com; aburgess@redhat.com; blarsen@redhat.com;
> > Willgerodt, Felix <felix.willgerodt@intel.com>
> > Subject: [PATCH v3 0/2] Testsuite changes for clang and icc/icx
> >
> > V1 was only one patch and can be found here:
> > https://sourceware.org/pipermail/gdb-patches/2022-June/189903.html
> > V2 can be found here:
> > https://sourceware.org/pipermail/gdb-patches/2022-July/191055.html
> >
> > This series disables some compiler warnings for clang and icc/icx
> > in the testsuite.
> >
> > Since V2 I only added a comment to callfuncs.exp, as requested
> > by Kevin Buettner.
> >
> > Thanks,
> > Felix
> >
> > Felix Willgerodt (2):
> >   gdb, testsuite: Enable testcases that suppress specific warnings, for
> >     icc/icx.
> >   gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning.
> >
> >  gdb/testsuite/gdb.base/callfuncs.exp |  4 +++-
> >  gdb/testsuite/lib/gdb.exp            | 10 +++++++---
> >  2 files changed, 10 insertions(+), 4 deletions(-)
> >
> > --
> > 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 0/2] Testsuite changes for clang and icc/icx
  2022-08-18  7:54 ` Willgerodt, Felix
@ 2022-08-18 16:34   ` Kevin Buettner
  2022-08-19 13:08     ` Willgerodt, Felix
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Buettner @ 2022-08-18 16:34 UTC (permalink / raw)
  To: Willgerodt, Felix; +Cc: gdb-patches, aburgess, blarsen

On Thu, 18 Aug 2022 07:54:32 +0000
"Willgerodt, Felix" <felix.willgerodt@intel.com> wrote:

> 2. Ping!

I approved it on July 27.  Unless you're waiting for comments from
others, I think you should push it.

Kevin


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH v3 0/2] Testsuite changes for clang and icc/icx
  2022-08-18 16:34   ` Kevin Buettner
@ 2022-08-19 13:08     ` Willgerodt, Felix
  0 siblings, 0 replies; 8+ messages in thread
From: Willgerodt, Felix @ 2022-08-19 13:08 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches, aburgess, blarsen

I didn't really read your messages as approval.
Thanks for clarifying and sorry for the noise.
I pushed this now.

Felix

> -----Original Message-----
> From: Kevin Buettner <kevinb@redhat.com>
> Sent: Donnerstag, 18. August 2022 18:35
> To: Willgerodt, Felix <felix.willgerodt@intel.com>
> Cc: gdb-patches@sourceware.org; aburgess@redhat.com; blarsen@redhat.com
> Subject: Re: [PATCH v3 0/2] Testsuite changes for clang and icc/icx
> 
> On Thu, 18 Aug 2022 07:54:32 +0000
> "Willgerodt, Felix" <felix.willgerodt@intel.com> wrote:
> 
> > 2. Ping!
> 
> I approved it on July 27.  Unless you're waiting for comments from
> others, I think you should push it.
> 
> Kevin

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-19 13:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27  8:51 [PATCH v3 0/2] Testsuite changes for clang and icc/icx Felix Willgerodt
2022-07-27  8:51 ` [PATCH v3 1/2] gdb, testsuite: Enable testcases that suppress specific warnings, for icc/icx Felix Willgerodt
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

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).