* [PATCH][gdb/build] Fix gdb build with -fsanitize=thread and gcc 7
@ 2022-06-25 9:08 Tom de Vries
2022-06-28 15:07 ` [commited][gdb/build] " Tom de Vries
0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2022-06-25 9:08 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [commited][gdb/build] Fix gdb build with -fsanitize=thread and gcc 7
2022-06-25 9:08 [PATCH][gdb/build] Fix gdb build with -fsanitize=thread and gcc 7 Tom de Vries
@ 2022-06-28 15:07 ` Tom de Vries
0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2022-06-28 15:07 UTC (permalink / raw)
To: gdb-patches
On 6/25/22 11:08, Tom de Vries wrote:
> 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?
>
Committed.
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-28 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-25 9:08 [PATCH][gdb/build] Fix gdb build with -fsanitize=thread and gcc 7 Tom de Vries
2022-06-28 15:07 ` [commited][gdb/build] " Tom de Vries
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).