Non-reentrant code generated by C co

mike mike at hpdcdb.UUCP
Wed Aug 15 08:37:00 AEST 1984

The easiest way I found to make structure valued functions reentrant was to
put the return value on the stack and return the location in a scratch
address register (if your machine has them). That has been done on the HP
9000 Series 200 with success.

By the way, I've never seen a real C program that was busted by making
structure valued functions reentrant. This feature has been in our compiler
for 2 years. Note, however, that we use our compiler primarily for system
builds and very little of the system code uses structure valued functions
since it really originated way back before version 1.7. Off hand it's hard
to envision a realistic case that depends on the static location of the value.
If anyone has one I'd like to see it.

				M.F. McNelly
				FSD HP
				Fort Collins, CO.

More information about the Comp.lang.c mailing list