Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Aug 1999 12:39:52 +0200 (CEST)
From:      A.Leidinger@WJPServer.CS.Uni-SB.de
To:        freebsd-current@freebsd.org
Subject:   Bug with malloc_options
Message-ID:  <199908191039.MAA00975@work.net.local>

next in thread | raw e-mail | index | archive | help
Hi,

-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?

Bye,
Alexander.

-- 
               99% of lawyers give the rest a bad name.

http://netchild.home.pages.de   A.Leidinger+Home @ WJPServer.CS.Uni-SB.de



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908191039.MAA00975>