From 52e0a9f766c29557c52b6dbef536103d30d97e86 Mon Sep 17 00:00:00 2001 From: Senthil Kumar Selvaraj Date: Tue, 2 May 2017 09:17:59 +0000 Subject: [PATCH] Fix broken pr78138.c for avr The declaration for memcpy had the size parameter declared as unsigned long. For avr, __SIZE_TYPE__ is unsigned int, and this caused a builtin-declaration-mismatch warning, resulting in a couple of FAILs. Fixed by typedef'ing __SIZE_TYPE__ to size_t and using size_t as the type for memcpy's third parameter. From-SVN: r247483 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr78138.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 205c083e3be0..3c5269745346 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-05-02 Senthil Kumar Selvaraj + + * gcc.dg/pr78138.c: Use __SIZE_TYPE__ instead of + unsigned long. + 2017-05-01 Xi Ruoyao PR c++/80038 diff --git a/gcc/testsuite/gcc.dg/pr78138.c b/gcc/testsuite/gcc.dg/pr78138.c index cfc5a8cb0f51..6129c91809c4 100644 --- a/gcc/testsuite/gcc.dg/pr78138.c +++ b/gcc/testsuite/gcc.dg/pr78138.c @@ -5,7 +5,9 @@ char d [5]; -void* memcpy (void*, const void*, unsigned long); +__extension__ typedef __SIZE_TYPE__ size_t; + +void* memcpy (void*, const void*, size_t); extern char* strcpy (char*, const char*); void f (int i, int j) -- 2.47.2