Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site arizona.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!ihnp4!arizona!rogerh
From: rogerh@arizona.UUCP (Roger Hayes)
Newsgroups: net.lang.c
Subject: Re: storage class "private"
Message-ID: <15991@arizona.UUCP>
Date: Sat, 29-Sep-84 16:37:54 EDT
Article-I.D.: arizona.15991
Posted: Sat Sep 29 16:37:54 1984
Date-Received: Sun, 30-Sep-84 05:01:22 EDT
References: <156@rlgvax.UUCP>
Organization: Dept of CS, U of Arizona, Tucson
Lines: 33

(In reference to Guy Harris' contention that a C compiler can't prohibit you
from taking the address of a variable declared "private")

A C compiler most certainly can!  Try taking the address of a register
variable.

I like the idea of class private -- it does add to the set of possible
optimizations.  Is there a cleaner way to do it?  I suppose that the
compiler could collect information about aliasing, but that isn't in
general computable.  

Why, oh why, don't C compilers optimize?  I am tired of hacking source
in order to get the code I know I want -- the technology certainly
exists to let the compiler do most of that work for me.  An example 
is using a pointer variable instead of array indexing in a 'for' loop --
for maximum efficiency, I have to write:
	{ struct foo *foop = fooarr;
	  for (i=0, i < FOOMAX; i++)
		dostuff(*(foop++));
	}
instead of what I mean:
	for (i=0; i < FOOMAX; i++)
		dostuff(fooarr[i]);

On another issue, I like the recent sugggestion that, in macro expansion,
the formals should have a special status.  The formals should be string-
expanded (ie, whether inside quotes or not); other macros should not.

	Roger Hayes
	University of Arizona, Dept of Computer Science
	rogerh@Arizona.CSNET
	rogerh@arizona.UUCP