* RE: [Ping v3] [PATCH 1/1] gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warnings.
@ 2022-07-11 9:18 Willgerodt, Felix
0 siblings, 0 replies; only message in thread
From: Willgerodt, Felix @ 2022-07-11 9:18 UTC (permalink / raw)
To: gdb-patches
*ping* v3
(Some non-approvers already said they would be happy to get this in)
Thanks,
Felix
> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Mittwoch, 29. Juni 2022 09:20
> To: gdb-patches@sourceware.org
> Subject: RE: [Ping v2] [PATCH 1/1] gdb, testsuite: Adapt
> gdb.base/callfuncs.exp for new clang warnings.
>
> *ping* v2
>
> Thanks,
> Felix
>
> > -----Original Message-----
> > From: Willgerodt, Felix
> > Sent: Mittwoch, 22. Juni 2022 10:40
> > To: gdb-patches@sourceware.org
> > Subject: RE: [Ping] [PATCH 1/1] gdb, testsuite: Adapt
> gdb.base/callfuncs.exp
> > for new clang warnings.
> >
> > *ping*
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > Sent: Mittwoch, 8. Juni 2022 09:17
> > > To: gdb-patches@sourceware.org
> > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > Subject: [PATCH 1/1] gdb, testsuite: Adapt gdb.base/callfuncs.exp for
> new
> > > clang warnings.
> > >
> > > This patch fixes two issues with callfuncs.exp, which are both related
> > > to new Clang warnings:
> > >
> > > 1) Clang 15.0.0 added a new warning for deprecated non-prototype
> > > functions:
> > > 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 for others to decide.
> > >
> > > 2) The other new warnings are about comparing a define with floats and
> > > doubles:
> > >
> > > callfuncs.c:518:1: warning: floating-point comparison is always true;
> > constant
> > > cannot be represented exactly in type 'float' [-Wliteral-range]
> > > DEF_FUNC_VALUES_3(fc, float, crealf, cimagf)
> > >
> > > This can be fixed by making the define a float.
> > > ---
> > > gdb/testsuite/gdb.base/callfuncs.c | 2 +-
> > > gdb/testsuite/gdb.base/callfuncs.exp | 2 +-
> > > 2 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/gdb/testsuite/gdb.base/callfuncs.c
> > > b/gdb/testsuite/gdb.base/callfuncs.c
> > > index d18d0dba073..cf7c75c1360 100644
> > > --- a/gdb/testsuite/gdb.base/callfuncs.c
> > > +++ b/gdb/testsuite/gdb.base/callfuncs.c
> > > @@ -96,7 +96,7 @@ long double _Complex ldc3 = 3.0L + 3.0Li;
> > > long double _Complex ldc4 = 4.0L + 4.0Li;
> > > #endif /* TEST_COMPLEX */
> > >
> > > -#define DELTA (0.001)
> > > +#define DELTA (0.001f)
> > >
> > > char *string_val1 = (char *)"string 1";
> > > char *string_val2 = (char *)"string 2";
> > > diff --git a/gdb/testsuite/gdb.base/callfuncs.exp
> > > b/gdb/testsuite/gdb.base/callfuncs.exp
> > > index 4448cc127ba..d74357b8b48 100644
> > > --- a/gdb/testsuite/gdb.base/callfuncs.exp
> > > +++ b/gdb/testsuite/gdb.base/callfuncs.exp
> > > @@ -18,7 +18,7 @@
> > >
> > > standard_testfile
> > >
> > > -set compile_flags {debug}
> > > +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] only message in thread
only message in thread, other threads:[~2022-07-11 9:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 9:18 [Ping v3] [PATCH 1/1] gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warnings 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).