From a90b0cdd444f6dde1084a439862cf507f6d3b2ae Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Thu, 21 Feb 2019 23:23:12 +0000 Subject: extend.texi (__clear_cache): Correct signature. gcc/ChangeLog: * doc/extend.texi (__clear_cache): Correct signature. libgcc/ChangeLog: * libgcc2.h (__clear_cache): Correct signature. * libgcc2.c (__clear_cache): Same. gcc/testsuite/ChangeLog: * gcc.dg/Wbuiltin-declaration-mismatch-12.c: New test. From-SVN: r269082 --- libgcc/ChangeLog | 5 +++++ libgcc/libgcc2.c | 9 ++++++--- libgcc/libgcc2.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 1ada079..950eeab 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2019-02-21 Martin Sebor + + * libgcc2.h (__clear_cache): Correct signature. + * libgcc2.c (__clear_cache): Same. + 2019-02-20 Uroš Bizjak * config/alpha/linux-unwind.h (alpha_fallback_frame_state): diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c index 04d3185..763b5fa 100644 --- a/libgcc/libgcc2.c +++ b/libgcc/libgcc2.c @@ -2162,11 +2162,14 @@ __eprintf (const char *string, const char *expression, /* Clear part of an instruction cache. */ void -__clear_cache (char *beg __attribute__((__unused__)), - char *end __attribute__((__unused__))) +__clear_cache (void *beg __attribute__((__unused__)), + void *end __attribute__((__unused__))) { #ifdef CLEAR_INSN_CACHE - CLEAR_INSN_CACHE (beg, end); + /* Cast the void* pointers to char* as some implementations + of the macro assume the pointers can be subtracted from + one another. */ + CLEAR_INSN_CACHE ((char *) beg, (char *) end); #endif /* CLEAR_INSN_CACHE */ } diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h index c9ce2d3..d7988f1 100644 --- a/libgcc/libgcc2.h +++ b/libgcc/libgcc2.h @@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #endif extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t); -extern void __clear_cache (char *, char *); +extern void __clear_cache (void *, void *); extern void __eprintf (const char *, const char *, unsigned int, const char *) __attribute__ ((__noreturn__)); -- cgit v1.1