Path: utzoo!mnetor!uunet!husc6!purdue!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Information hiding Message-ID: <11240@mimsy.UUCP> Date: 27 Apr 88 02:49:15 GMT References: <10576@steinmetz.ge.com> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 31 In article <10576@steinmetz.ge.com> davidsen@steinmetz.ge.com > One of the things which bothers me about the C language is that many >(most) compilers, and lint, complain about taking the address on an >array. The dpANS requires that &arr be allowed; it produces a pointer to the array, i.e., an object whose type is `pointer to T1', where T1 is the type of arr, `array N of T2'. I have not tried it, but I suspect that PCC can be changed to conform to this rule by removing one test. In cgram.y, somewhere around line 690, there is a rule for `AND term' that begins with ={ if( ISFTN($2->in.type) || ISARY($2->in.type) ){ werror( "& before array or function: ignored" ); $$ = $2; } else if( $2->in.op == UNARY MUL && Changing this to ={ if( ISFTN($2->in.type) ){ werror( "& before function: ignored" ); $$ = $2; } else if( $2->in.op == UNARY MUL && ought to do it. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris