re PR fortran/62278 (gfc_check_dependency should also check for TARGET attribute)
[official-gcc.git] / libiberty / memset.c
blob476668961271373f5e9e12b76e7fd9a32cf7879b
1 /* memset
2 This implementation is in the public domain. */
4 /*
6 @deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, @
7 size_t @var{count})
9 Sets the first @var{count} bytes of @var{s} to the constant byte
10 @var{c}, returning a pointer to @var{s}.
12 @end deftypefn
16 #include <ansidecl.h>
17 #include <stddef.h>
19 PTR
20 memset (PTR dest, register int val, register size_t len)
22 register unsigned char *ptr = (unsigned char*)dest;
23 while (len-- > 0)
24 *ptr++ = val;
25 return dest;