From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/build] Fix gdb build with -fsanitize=thread and gcc 7
Date: Sat, 25 Jun 2022 11:08:47 +0200 [thread overview]
Message-ID: <20220625090840.GA21429@delia.com> (raw)
Hi,
When building gdb with system gcc 7.5.0, I run into:
...
gdb/ia64-tdep.c: In function ‘int is_float_or_hfa_type_recurse(type*, type**)’:
gdb/ia64-tdep.c:3362:1: error: control reaches end of non-void function \
[-Werror=return-type]
...
This is due to PR gcc/81275 - "-fsanitize=thread produce incorrect
-Wreturn-type warning", which has been fixed in gcc-8.
Work around this by moving the default return outside the switch.
Tested on x86_64-linux.
Any comments?
Thanks,
- Tom
[gdb/build] Fix gdb build with -fsanitize=thread and gcc 7
---
gdb/ia64-tdep.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 82456dc9c98..b94225b5e13 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -3356,9 +3356,10 @@ is_float_or_hfa_type_recurse (struct type *t, struct type **etp)
}
break;
default:
- return 0;
break;
}
+
+ return 0;
}
/* Determine if the given type is one of the floating point types or
next reply other threads:[~2022-06-25 9:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-25 9:08 Tom de Vries [this message]
2022-06-28 15:07 ` [commited][gdb/build] " Tom de Vries
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=20220625090840.GA21429@delia.com \
--to=tdevries@suse.de \
--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).