public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, testsuite, committed] Fix bogus pr78886.c for avr
@ 2017-05-17  6:34 Senthil Kumar Selvaraj
  0 siblings, 0 replies; only message in thread
From: Senthil Kumar Selvaraj @ 2017-05-17  6:34 UTC (permalink / raw)
  To: GCC

Hi,

  The test declares malloc with an unsigned long parameter. This causes
  a warning for avr, as it's size_t is only unsigned int.

  Fixed by typdef'ing __SIZE_TYPE__ to size_t and using it in the malloc
  function's declaration.

  Committed as obvious.

Regards
Senthil

gcc/testsuite/ChangeLog

2017-05-17  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

	* gcc.dg/tree-ssa/pr78886.c: Use __SIZE_TYPE__ instead of
	unsigned long.

Index: gcc/testsuite/gcc.dg/tree-ssa/pr78886.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr78886.c	(revision 248137)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr78886.c	(working copy)
@@ -1,7 +1,9 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
-void *malloc(unsigned long x);
 
+__extension__ typedef __SIZE_TYPE__ size_t;
+void *malloc(size_t x);
+
 void foo(void)
 {
  volatile int i;

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

only message in thread, other threads:[~2017-05-17  5:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17  6:34 [Patch, testsuite, committed] Fix bogus pr78886.c for avr Senthil Kumar Selvaraj

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