Nested Comments in C -- A recent experience

Walter Bright bright at Data-IO.COM
Tue Mar 20 06:36:12 AEST 1990


In article <12351 at goofy.megatest.UUCP> djones at megatest.UUCP (Dave Jones) writes:
<From article <2381 at dataio.Data-IO.COM>, by bright at Data-IO.COM (Walter Bright):
<< <    (void) memcpy((void *) &x, (void *) &y, sizeof(y));
<< It's more readable if you eliminate the redundant clutter:
<< 	memcpy(&x,&y,sizeof(y));	/* Copy y into x	*/
<Strictly speaking, you have to keep the (void*) casts, just in case some
<enemy system codes some kinds of pointers in screwy ways. It can happen.

Not so. If memcpy is prototyped properly, the (void*) casts will be
inserted automagically by the compiler.



More information about the Comp.lang.c mailing list