read-only strings? and also VOLATILE

PAD Powell padpowell at wateng.UUCP
Sun Oct 21 01:17:50 AEST 1984


I like the VOLATILE concept, coupled with the following caveats:
1.  No access optimizations must be done for objects fetched/stored
	using a volitile object.
2.  Note that the above will "break" bit fields (Hurrah!) but allow
	us poor hardware types some idea of how to write code.
	I might add that newer interfaces do not suffer from the
	"byte/word" access problems, as us designers have learned
	(Well, some of us, anyways) about this problem.

Read only strings?  Sounds like a GOOD idea. In rebuttal to some people
with "writable strings passed to routines", I suggest the following

	char *temp[] = "temp_fileXXXXXX";
	...
	if( mktemp(temp) < 0 ) FATALMSG( "your string was too short" );

Patrick ("snprintf?  sprintf with bounds checking?  PLLEEEASE??")
	Powell



More information about the Comp.lang.c mailing list