public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2555] opts: always compare array option values with memcmp
@ 2022-09-09  5:34 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-09-09  5:34 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b237e36b3864b64894fb4c342f8647e004c8f3de

commit r13-2555-gb237e36b3864b64894fb4c342f8647e004c8f3de
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Sep 8 20:00:33 2022 +0200

    opts: always compare array option values with memcmp
    
    gcc/ChangeLog:
    
            * optc-save-gen.awk: Always compare array option values with memcmp.

Diff:
---
 gcc/optc-save-gen.awk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/optc-save-gen.awk b/gcc/optc-save-gen.awk
index 233d1fbb637..49065ced0b3 100644
--- a/gcc/optc-save-gen.awk
+++ b/gcc/optc-save-gen.awk
@@ -1093,8 +1093,7 @@ for (i = 0; i < n_target_array; i++) {
 	name = var_target_array[i]
 	size = var_target_array_size[i]
 	type = var_target_array_type[i]
-	print "  if (ptr1->" name" != ptr2->" name "";
-	print "      || memcmp (ptr1->" name ", ptr2->" name ", " size " * sizeof(" type ")))"
+	print "  if (memcmp (ptr1->" name ", ptr2->" name ", " size " * sizeof(" type ")))"
 	print "    return false;";
 }
 for (i = 0; i < n_target_val; i++) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-09  5:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09  5:34 [gcc r13-2555] opts: always compare array option values with memcmp Martin Liska

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).