public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-4183] aarch64: Ensure const and sign correctness
@ 2023-09-20 18:41 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2023-09-20 18:41 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0a59ff65df6da8267efb5c97dead8cd0dcd5b445

commit r14-4183-g0a59ff65df6da8267efb5c97dead8cd0dcd5b445
Author: Pekka Seppänen <pexu@gcc.mail.kapsi.fi>
Date:   Wed Sep 20 19:41:01 2023 +0100

    aarch64: Ensure const and sign correctness
    
    Be const and sign correct by using a matching CIE augmentation type.
    Use a builtin instead of relying <string.h> being included.
    
    libgcc/ChangeLog:
    
            * config/aarch64/aarch64-unwind.h (aarch64_cie_signed_with_b_key):
            Use const unsigned type and a builtin.
    
    Signed-off-by: Pekka Seppänen <pexu@gcc.mail.kapsi.fi>

Diff:
---
 libgcc/config/aarch64/aarch64-unwind.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libgcc/config/aarch64/aarch64-unwind.h b/libgcc/config/aarch64/aarch64-unwind.h
index 3ad2f8239ed..d669edd671b 100644
--- a/libgcc/config/aarch64/aarch64-unwind.h
+++ b/libgcc/config/aarch64/aarch64-unwind.h
@@ -40,8 +40,9 @@ aarch64_cie_signed_with_b_key (struct _Unwind_Context *context)
       const struct dwarf_cie *cie = get_cie (fde);
       if (cie != NULL)
 	{
-	  char *aug_str = cie->augmentation;
-	  return strchr (aug_str, 'B') == NULL ? 0 : 1;
+	  const unsigned char *aug_str = cie->augmentation;
+	  return __builtin_strchr ((const char *) aug_str,
+				   'B') == NULL ? 0 : 1;
 	}
     }
   return 0;

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

only message in thread, other threads:[~2023-09-20 18:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-20 18:41 [gcc r14-4183] aarch64: Ensure const and sign correctness Richard Sandiford

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