This is the mail archive of the
mailing list for the GCC project.
Re: Built-in bzero in GCC 3.0.2
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Subject: Re: Built-in bzero in GCC 3.0.2
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sun, 04 Nov 2001 21:13:55 -0800
> The bzero's prototype in DJGPP's string.h is this:
> void * bzero(void *ptr, size_t _len);
> Could someone please tell what prototype of bzero does GCC expect?
> More generally, how can one know what prototypes does GCC expect from
> functions it treats as built-in?
Unfortunately, you have to look at the source. (It would be nice
if the error message told you what it expected.)
The file builtins.def contains:
true, true, true)
The 4th parameter is the interesting one; it says that the function
is expected to take a "traditional pointer" (i.e., `char *' in
traditional mode and `void *' normally) and a length (i.e., size_t)
and return `void'. Your declaration returns `void *' which is probably
Mark Mitchell email@example.com
CodeSourcery, LLC http://www.codesourcery.com