home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!rutgers!twwells!bill
- From: bill@twwells.com (T. William Wells)
- Newsgroups: comp.std.c
- Subject: Re: pointer comparisons
- Message-ID: <C042x5.FAn@twwells.com>
- Date: 31 Dec 92 06:48:38 GMT
- References: <1hsdg8INN5jm@urmel.informatik.rwth-aachen.de>
- Organization: None, Mt. Laurel, NJ
- Lines: 13
-
- In article <1hsdg8INN5jm@urmel.informatik.rwth-aachen.de> berg@physik.tu-muenchen.de (Stephen R. van den Berg) writes:
- : a=malloc(1); b=malloc(1);
- : i+=a>b; i+=a>=b; i+=a<b; i+=a<=b;
- :
- : Is this program *always* required to print or return "3"?
-
- No. It may core dump or otherwise behave in undefined ways.
- Relationals require that the pointers be into (or at the end of)
- the same object.
-
- ---
- Bill { rutgers | decwrl | telesci }!twwells!bill
- bill@twwells.com
-