public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 2/2] gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning.
Date: Tue, 26 Jul 2022 18:12:36 -0700	[thread overview]
Message-ID: <20220726181236.4958cd5d@f35-zws-1> (raw)
In-Reply-To: <20220725113822.1855437-3-felix.willgerodt@intel.com>

On Mon, 25 Jul 2022 13:38:22 +0200
Felix Willgerodt via Gdb-patches <gdb-patches@sourceware.org> wrote:

> 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 up for others to decide.

This approach seems reasonable to me.  However, I think you should
move at least some of the explanation provided above into a (new) comment
just before the line added by your patch.

> ---
>  gdb/testsuite/gdb.base/callfuncs.exp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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
> 


  reply	other threads:[~2022-07-27  1:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 11:38 [PATCH v2 0/2] Testsuite changes for clang and icc/icx Felix Willgerodt
2022-07-25 11:38 ` [PATCH v2 1/2] gdb, testsuite: Enable testcases that suppress specific warnings, for icc/icx Felix Willgerodt
2022-07-27  1:07   ` Kevin Buettner
2022-07-25 11:38 ` [PATCH v2 2/2] gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning Felix Willgerodt
2022-07-27  1:12   ` Kevin Buettner [this message]
2022-07-25 11:45 ` [PATCH v2 0/2] Testsuite changes for clang and icc/icx 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=20220726181236.4958cd5d@f35-zws-1 \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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).