Article View: comp.std.c++
Article #1303Re: Pointer comparisons
From: Daniel R. Edelson
Date: Fri, 18 Dec 1992 19:46
Date: Fri, 18 Dec 1992 19:46
22 lines
1453 bytes
1453 bytes
In article <1992Dec18.181029.1061@taumet.com> steve@taumet.com (Steve Clamage) writes: > >Right. In the C Standard, it is stated explicitly that two pointers >of the same type which compare equal point to the same object or >function. There is no such statment for C++ in the ARM or in the >current C++ Committee working draft. > >Steve Clamage, TauMetric Corp, steve@taumet.com There's also a problem regarding inline functions. Specifically, under common file-based C++ implementations, the address of an inline function can vary between compilation units. Thus, the requirement from Ansi C (Sec 3.3.9) ``If two pointers to function types ... both point to the same function, they compare equal.'' is false under common C++ implementations. In my view, this suggests that perhaps it should be illegal to take the address of an inline function. Daniel Edelson daniel@cse.ucsc.edu
Technical Details
Message-ID:
<1gt9qjINNsrr@darkstar.UCSC.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!olivea!hal.com!darkstar.UCSC.EDU!danielReferences:
<BzDs2x.wA@frumious.uucp> <1992Dec17.151642.9954@bcrka451.bnr.ca> <1992Dec18.181029.1061@taumet.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!olivea!hal.com!darkstar.UCSC.EDU!daniel From: daniel@cse.ucsc.edu (Daniel R. Edelson) Newsgroups: comp.std.c++ Subject: Re: Pointer comparisons Message-ID: <1gt9qjINNsrr@darkstar.UCSC.EDU> Date: 18 Dec 92 19:46:27 GMT References: <BzDs2x.wA@frumious.uucp> <1992Dec17.151642.9954@bcrka451.bnr.ca> <1992Dec18.181029.1061@taumet.com> Organization: University of California, Santa Cruz (CE/CIS Boards) Lines: 22 NNTP-Posting-Host: oak.ucsc.edu