From: "Mark E." To: djgpp-workers AT delorie DOT com, eliz AT is DOT elta DOT co DOT il Date: Thu, 20 Jul 2000 09:27:15 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: GCC headers and DJGPP port Message-ID: <3976C5F3.203.1592BB@localhost> In-reply-to: <200007201112.NAA14791@loewis.home.cs.tu-berlin.de> References: <200007200642 DOT CAA09333 AT indy DOT delorie DOT com> (message from Eli Zaretskii on Thu, 20 Jul 2000 02:42:48 -0400 (EDT)) X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Yes. Please re-read my message elaborating on __null semantics. Usage > of __null does not result in an assembler-level reference to a symbol > named __null; there is no such symbol. As a result, libc.a does not > need to provide anything. > > Instead, cc1plus will emit 'zero' immediate values in assembler, > depending on the assembler language (e.g. clearing eax). > Eli, this appears to be correct: #include int main() { char *null1 = __null; char *null2 = NULL; return 0; } .file "null.cpp" gcc2_compiled.: ___gnu_compiled_cplusplus: .section .text .p2align 2 .globl _main _main: pushl %ebp movl %esp,%ebp subl $24,%esp movl $0,-4(%ebp) movl $0,-8(%ebp) xorl %eax,%eax jmp L2 xorl %eax,%eax jmp L2 .p2align 4,,7 L2: movl %ebp,%esp popl %ebp ret