home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / std / c / 3300 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  806 b 

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