Fix broken pr78138.c for avr
authorSenthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
Tue, 2 May 2017 09:17:59 +0000 (09:17 +0000)
committerSenthil Kumar Selvaraj <saaadhu@gcc.gnu.org>
Tue, 2 May 2017 09:17:59 +0000 (09:17 +0000)
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
gcc/testsuite/gcc.dg/pr78138.c

index 205c083..3c52697 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-02  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+       * gcc.dg/pr78138.c: Use __SIZE_TYPE__ instead of
+       unsigned long.
+
 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
 
        PR c++/80038
index cfc5a8c..6129c91 100644 (file)
@@ -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)