aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcc2.c
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2019-02-21 23:23:12 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2019-02-21 16:23:12 -0700
commita90b0cdd444f6dde1084a439862cf507f6d3b2ae (patch)
tree373cbb191e0a6d29969a8327839aac3d1f5042e0 /libgcc/libgcc2.c
parent4bcd47e2e1975635ea18d61accf7dcbf64306aa7 (diff)
downloadgcc-a90b0cdd444f6dde1084a439862cf507f6d3b2ae.zip
gcc-a90b0cdd444f6dde1084a439862cf507f6d3b2ae.tar.gz
gcc-a90b0cdd444f6dde1084a439862cf507f6d3b2ae.tar.bz2
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
Diffstat (limited to 'libgcc/libgcc2.c')
-rw-r--r--libgcc/libgcc2.c9
1 files changed, 6 insertions, 3 deletions
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 */
}