Article View: comp.std.c
Article #2940Re: pointer comparisons
From: T. William Wells
Date: Thu, 31 Dec 1992 06:48
Date: Thu, 31 Dec 1992 06:48
13 lines
829 bytes
829 bytes
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
Technical Details
Message-ID:
<C042x5.FAn@twwells.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!rutgers!twwells!billReferences:
<1hsdg8INN5jm@urmel.informatik.rwth-aachen.de>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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