ANSI C suggestions

Tony L. Hansen hansen at pegasus.UUCP
Mon Oct 22 10:00:39 AEST 1984


<And people who want to put tables or strings into shared code space, although
<there you can get away with them being in non-shared and writable data space.

One thing that comes up is some way of automatically making the format
string arguments to printf statements be "const". (There are people who
actually wanted to make all character strings be of type const by default.)
It turns out that this is trivial if one uses the proposed function
declaration syntax to say that the printf's first argument is a "char
*const". The compiler can look at that, see that the string will never be
changed and place the string into readonly (and potentially sharable)
dataspace.

I'm excited about this possibility.

					Tony Hansen
					pegasus!hansen



More information about the Comp.lang.c mailing list