🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3643

Re: NULL-pointers are not equal

#3643
From: Tanmoy Bhattacharya
Date: Thu, 03 Aug 1995 16:53
30 lines
1519 bytes
In article <3vqqtu$2r9@nms.telepost.no>, Rune.huseby@gpi.telemax.no (Rune
Huseby) writes: 
|> In Visual C++ 1.5 and Borland C++, the following example prints "false",
even  
|> though section 6.2.2.3 of the standard gives that it should print "true"
|> 
|> void main(void)
|> {
|>   int *ptr1 = NULL;
|>   int __far *ptr2 = NULL;
|>   
|>   if(ptr1 == ptr2)
|>      printf("true");
|>   else
|>      printf("false");     
|> }

The standard says nothing about a program that uses __far. If you use an
identifier from the implementation namespace, only the implementation
documentation can tell you what happens: the standard is irrelevant.

Cheers
Tanmoy
-- 
tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87544-0285,USA H:#3,802,9 St,NM87545
Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
<http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
Technical Details
Message-ID: <3vquuj$f6m@newshost.lanl.gov>
Path: arc1-ca.pugleaf.net!qcd.lanl.gov!tanmoy
References: <3vqqtu$2r9@nms.telepost.no>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!qcd.lanl.gov!tanmoy
From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
Newsgroups: comp.std.c
Subject: Re: NULL-pointers are not equal
Date: 3 Aug 1995 16:53:39 GMT
Organization: Los Alamos National Laboratory
Distribution: world
Message-ID: <3vquuj$f6m@newshost.lanl.gov>
References: <3vqqtu$2r9@nms.telepost.no>
NNTP-Posting-Host: qcd.lanl.gov