home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c
- Path: sparky!uunet!wupost!csus.edu!netcom.com!jimlynch
- From: jimlynch@netcom.com (Jim Lynch)
- Subject: Re: pointer comparisons
- Message-ID: <1993Jan1.142156.23920@netcom.com>
- Organization: Netcom Online Communications Services (408-241-9760 login: guest)
- References: <1hsdg8INN5jm@urmel.informatik.rwth-aachen.de> <C04LIz.3DG@NCoast.ORG>
- Date: Fri, 1 Jan 1993 14:21:56 GMT
- Lines: 21
-
- In article <C04LIz.3DG@NCoast.ORG> brown@NCoast.ORG (Stan Brown) writes:
- >In article <1hsdg8INN5jm@urmel.informatik.rwth-aachen.de> berg@physik.tu-muenchen.de (Stephen R. van den Berg) writes:
- >>What about the following program: [of which I show only the salient parts]
- >>void*a,*b;
- >>
- >>main()
- >>{ int i; /* initial assignment deleted */
- >> a=malloc(1); b=malloc(1);
- >> i+=a>b;
- >> printf("%d\n",i);
- >> return i;
- >>}
- >>---------------------------------------
- >>
- >>Is this program *always* required to print or return "3"?
- >
- >I believe this program is not obligated to print or return _anything_,
- >but may, in John Woods's happy phrase, "cause demons to fly out of your
- >nose."
-
- Aside from which 'i' has an undefined value...
-