home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c++
- Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
- From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
- Subject: Re: Zero-length structures and pointer comparisons
- Message-ID: <9236103.3795@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- References: <1992Dec16.201044.2968@microsoft.com> <1992Dec18.193554.18588@ucc.su.OZ.AU> <1gtblgINN72@darkstar.UCSC.EDU> <1992Dec22.002957.25597@ucc.su.OZ.AU>
- Date: Fri, 25 Dec 1992 16:35:27 GMT
- Lines: 30
-
- maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
-
- >daniel@cse.ucsc.edu (Daniel R. Edelson) writes:
- [...]
- >>Thus, this property need not be true in any program that
- >>calls the operating system.
- >
- > That is in the spirit of what I wanted, but I'm
- >not sure if a standard can say it in those words. Besides,
- >I wanted to be more explicit: even if I do an operting
- >system call somewhere, I want the system
- >to guarrantee
- >
- > T* p=new T;
- > T* q=p;
- > if(!(p==q))cout<"Non conforming program";
-
- I'm afraid that this is not possible.
- For proof, consider the following hypothetical operating system call:
-
- random_poke() : sets a random memory location to a random value
-
- After calling this operating system call, you can make NO further guarantees
- about the behaviour of your system.
-
- --
- Fergus Henderson fjh@munta.cs.mu.OZ.AU
- This .signature virus is a self-referential statement that is true - but
- you will only be able to consistently believe it if you copy it to your own
- .signature file!
-