Non-reentrant code generated by C compiler

Henry Spencer henry at utzoo.UUCP
Sun Aug 26 08:45:27 AEST 1984


> Actually, with all the muttering in this group of late on how to redo struct-
> valued returns, returning a structure probably IS nonportable--sometimes it
> will be reentrant, sometimes not.

There's nothing unportable about structure returns if your code doesn't
need reentrancy, which is true of 95% of all C programs at least.

> And, of course, return of structures was absent before the advent of Version 7--
> so struct-valued functions are not portable to Version 6 and its clones.

There were a great many other things absent before V7; very few modern
C programs will compile successfully on a V6 C compiler.  For example, both
"long" and "typedef" arrived after V6 (although some "6.5" compilers, like
the Phototypesetter compiler, had them).  Portability to a true V6 compiler
is prohibitively difficult, and probably not worthwhile.  V7 is the de facto
standard against which C compilers have been measured for some time.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list