hi, there!
On Thu, 19 Aug 1999 [EMAIL PROTECTED] wrote:
> -current from ~3 days ago.
>
> from malloc(3):
> ---snip---
> To specify in the source that a program does no return value checking on
> calls to these functions:
>
> extern char *malloc_options;
> malloc_options = "X";
> ---snip---
>
> my source:
> ---snip---
> #include <sys/types.h>
> #include <stdio.h>
> #include <stdlib.h> /* malloc() */
> #include <stddef.h> /* offsetof(...) */
> #include <unistd.h> /* get?id() */
> #include <signal.h>
> #include <errno.h>
>
> #if defined(__FreeBSD__) && defined(DEBUG)
> extern char *malloc_options; /* Line 22 */
> malloc_options = "JX"; /* Line 23 */
> #endif
> ---snip---
>
> The output of gcc:
> ---snip---
> 23: warning: type defaults to `int' in declaration of `malloc_options'
> 23: conflicting types for `malloc_options'
> 22: previous declaration of `malloc_options'
> 23: warning: initialization makes integer from pointer without a cast
> 23: warning: data definition has no type or storage class
> ---snip---
>
> The output of gcc -E:
> ---snip---
> extern char *malloc_options;
> malloc_options = "JX";
> ---snip---
>
> Should I go to bed or is this a bug in FreeBSD?
first. 'malloc_options = "JX";' should be be within function body
/fjoe
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message