public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix small bug in compile.exp
Date: Wed, 15 Nov 2023 12:08:26 -0800	[thread overview]
Message-ID: <5ff235a3-1e9f-4577-8e20-83c8ba34db1f@redhat.com> (raw)
In-Reply-To: <20231115194513.176487-1-tom@tromey.com>

On 11/15/23 11:45, Tom Tromey wrote:
> compile.exp generally does not work for me on Fedora 38.  However, I
> sent a GCC patch to fix the plugin crash.  With that patch, I get this
> error from one test in compile.exp: >
> gdb command line:1:22: warning: initialization of 'int (*)(int)' from incompatible pointer type 'int (*)()' [-Wincompatible-pointer-types]
> 
> This patch adds a cast to compile.exp.  This makes the test pass.

Thank you for addressing this. I *may* have it on my TODO to "clean" 
some of this up in the not-too-distant future.

> ---
>   gdb/testsuite/gdb.compile/compile.exp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp
> index f2ab4fafa93..86521e99dac 100644
> --- a/gdb/testsuite/gdb.compile/compile.exp
> +++ b/gdb/testsuite/gdb.compile/compile.exp
> @@ -307,7 +307,7 @@ gdb_test "compile code globalvar = func_nodebug (75);" \
>       "call func_nodebug"
>   gdb_test "p globalvar" " = -75" "expect -75"
>   gdb_test \
> -    "compile code int (*funcp) (int) = func_nodebug; globalvar = funcp (76);" \
> +    "compile code int (*funcp) (int) = (int (*) (int)) func_nodebug; globalvar = funcp (76);" \
>       "warning: function has unknown return type; assuming int" \
>       "call func_nodebug indirectly"
>   gdb_test "p globalvar" " = -76" "expect -76"

LGTM

Reviewed-by: Keith Seitz <keiths@redhat.com>

Keith


      reply	other threads:[~2023-11-15 20:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 19:45 Tom Tromey
2023-11-15 20:08 ` Keith Seitz [this message]

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=5ff235a3-1e9f-4577-8e20-83c8ba34db1f@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --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).