Article View: comp.std.c++
Article #1300Re: Zero-length structures and pointer comparisons
From: John MAX Skaller
Date: Fri, 18 Dec 1992 19:07
Date: Fri, 18 Dec 1992 19:07
26 lines
1742 bytes
1742 bytes
In article <BzG1Jx.JH@frumious.uucp> uunet.ca!frumious!pat writes:
>|
>|> So the question is really whether the requirement that pointers to
>|> the same object compare equal should be left implementation defined.
>
>Here I would disagree. I think the question is whether, if the C++
>standard adopts the same notions of conformity as the C standard,
>pointers to the same object should be required to compare equal
>in a conforming program.
>
>And the answer is _no_.
Well, either way, this is not what the ARM says.
I would expect that pointers should compare equal after assignment
or initialisation (assuming they're the same type). And other
operations we could list.
However, if raw pointers were supplied by an external source
such as the OS, I would prefer the answer be 'implementation defined'.
I dont know if this is workable, but the current status seems overly
restrictive.
--
;----------------------------------------------------------------------
JOHN (MAX) SKALLER, maxtal@extro.ucc.su.oz.au
Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
Technical Details
Message-ID:
<1992Dec18.190755.15392@ucc.su.OZ.AU>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtalReferences:
<1992Dec15.162202.11231@ucc.su.OZ.AU> <1992Dec17.150914.2783@lpi.liant.com> <BzG1Jx.JH@frumious.uucp>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++ Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) Subject: Re: Zero-length structures and pointer comparisons Message-ID: <1992Dec18.190755.15392@ucc.su.OZ.AU> Sender: news@ucc.su.OZ.AU Nntp-Posting-Host: extro.ucc.su.oz.au Organization: MAXTAL P/L C/- University Computing Centre, Sydney References: <1992Dec15.162202.11231@ucc.su.OZ.AU> <1992Dec17.150914.2783@lpi.liant.com> <BzG1Jx.JH@frumious.uucp> Date: Fri, 18 Dec 1992 19:07:55 GMT Lines: 26