Article View: comp.std.c
Article #2999Re: pointer comparisons
From: Jim Lynch
Date: Fri, 01 Jan 1993 14:21
Date: Fri, 01 Jan 1993 14:21
21 lines
1171 bytes
1171 bytes
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...
Technical Details
Message-ID:
<1993Jan1.142156.23920@netcom.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!csus.edu!netcom.com!jimlynchReferences:
<1hsdg8INN5jm@urmel.informatik.rwth-aachen.de> <C04LIz.3DG@NCoast.ORG>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!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