Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Remove redundant check from check_types_equal
@ 2026-08-05 19:37 Tom Tromey
  2026-08-06  7:20 ` Tom de Vries
  2026-08-06  9:57 ` Aktemur, Baris
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Tromey @ 2026-08-05 19:37 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

check_types_equal compares both is_nottext and instance_flags, but the
latter includes the former, so the redundant check can be removed.
---
 gdb/gdbtypes.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index f5c0177bff2..4b6c01910f4 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -4092,7 +4092,6 @@ check_types_equal (struct type *type1, struct type *type2,
       || type1->endianity_is_not_default () != type2->endianity_is_not_default ()
       || type1->has_varargs () != type2->has_varargs ()
       || type1->is_vector () != type2->is_vector ()
-      || type1->is_nottext () != type2->is_nottext ()
       || type1->instance_flags () != type2->instance_flags ()
       || type1->num_fields () != type2->num_fields ())
     return false;

base-commit: b7da195b94b423e5cfd27a14c636ffe9f7380cdd
-- 
2.55.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Remove redundant check from check_types_equal
  2026-08-05 19:37 [PATCH] Remove redundant check from check_types_equal Tom Tromey
@ 2026-08-06  7:20 ` Tom de Vries
  2026-08-06  9:57 ` Aktemur, Baris
  1 sibling, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2026-08-06  7:20 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

On 8/5/26 9:37 PM, Tom Tromey wrote:
> check_types_equal compares both is_nottext and instance_flags, but the
> latter includes the former, so the redundant check can be removed.

LGTM.

Approved-By: Tom de Vries <tdevries@suse.de>

Thanks,
- Tom

> ---
>   gdb/gdbtypes.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
> index f5c0177bff2..4b6c01910f4 100644
> --- a/gdb/gdbtypes.c
> +++ b/gdb/gdbtypes.c
> @@ -4092,7 +4092,6 @@ check_types_equal (struct type *type1, struct type *type2,
>         || type1->endianity_is_not_default () != type2->endianity_is_not_default ()
>         || type1->has_varargs () != type2->has_varargs ()
>         || type1->is_vector () != type2->is_vector ()
> -      || type1->is_nottext () != type2->is_nottext ()
>         || type1->instance_flags () != type2->instance_flags ()
>         || type1->num_fields () != type2->num_fields ())
>       return false;
> 
> base-commit: b7da195b94b423e5cfd27a14c636ffe9f7380cdd


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] Remove redundant check from check_types_equal
  2026-08-05 19:37 [PATCH] Remove redundant check from check_types_equal Tom Tromey
  2026-08-06  7:20 ` Tom de Vries
@ 2026-08-06  9:57 ` Aktemur, Baris
  1 sibling, 0 replies; 3+ messages in thread
From: Aktemur, Baris @ 2026-08-06  9:57 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

AMD General

Hi Tom,

> check_types_equal compares both is_nottext and instance_flags, but the
> latter includes the former, so the redundant check can be removed.
> ---
>  gdb/gdbtypes.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
> index f5c0177bff2..4b6c01910f4 100644
> --- a/gdb/gdbtypes.c
> +++ b/gdb/gdbtypes.c
> @@ -4092,7 +4092,6 @@ check_types_equal (struct type *type1, struct type *type2,
>        || type1->endianity_is_not_default () != type2->endianity_is_not_default ()
>        || type1->has_varargs () != type2->has_varargs ()
>        || type1->is_vector () != type2->is_vector ()
> -      || type1->is_nottext () != type2->is_nottext ()
>        || type1->instance_flags () != type2->instance_flags ()
>        || type1->num_fields () != type2->num_fields ())
>      return false;

This LGTM.  Thanks.

Reviewed-By: Tankut Baris Aktemur <TankutBaris.Aktemur@amd.com>

-Baris


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-06  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-05 19:37 [PATCH] Remove redundant check from check_types_equal Tom Tromey
2026-08-06  7:20 ` Tom de Vries
2026-08-06  9:57 ` Aktemur, Baris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox