Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site brl-vgr.ARPA Path: utzoo!watmath!clyde!floyd!harpo!seismo!brl-vgr!gwyn From: gwyn@brl-vgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: valid program? Message-ID: <3319@brl-vgr.ARPA> Date: Fri, 6-Apr-84 13:52:07 EST Article-I.D.: brl-vgr.3319 Posted: Fri Apr 6 13:52:07 1984 Date-Received: Sat, 7-Apr-84 06:13:02 EST References: <162@boulder.UUCP> Organization: Ballistics Research Lab Lines: 15 main() { int *i, *j; &(*i) = j; } Your sample program is not valid since an lvalue is required on the left side of the assignment. The Ritchie PDP-11 C compiler gets this right; PCC does not (as of UNIX System V Release 1). PCC turns &(*i) into i and proceeds. One way of looking at this is: What i points to, (*i), is some int somewhere, maybe in another module. The address of that is the storage location of that other int. This has nothing to do with i itself; it may be a load-time constant that cannot be changed.