From owner-freebsd-current Thu Aug 19 4:41:52 1999 Delivered-To: freebsd-current@freebsd.org Received: from iclub.nsu.ru (iclub.nsu.ru [193.124.222.66]) by hub.freebsd.org (Postfix) with ESMTP id 72E6314E8D for ; Thu, 19 Aug 1999 04:41:40 -0700 (PDT) (envelope-from fjoe@iclub.nsu.ru) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.9.3/8.9.3) with ESMTP id SAA65494; Thu, 19 Aug 1999 18:37:41 +0700 (NSS) (envelope-from fjoe@iclub.nsu.ru) Date: Thu, 19 Aug 1999 18:37:41 +0700 (NSS) From: Max Khon To: A.Leidinger@WJPServer.CS.Uni-SB.de Cc: freebsd-current@FreeBSD.ORG Subject: Re: Bug with malloc_options In-Reply-To: <199908191039.MAA00975@work.net.local> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! On Thu, 19 Aug 1999 A.Leidinger@WJPServer.CS.Uni-SB.de 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 > #include > #include /* malloc() */ > #include /* offsetof(...) */ > #include /* get?id() */ > #include > #include > > #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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message