Bernd Walter <[email protected]> writes: > I'm not sure when removing a memset is allowed.
Always, if the compiler can determine that the data will not be used later. In more general terms, the compiler is allowed to make any changes it likes to the program as long as the end result behaves exactly like it would if it hadn't been changed. This is called the "as if" rule. For instance, if you call printf() or fprintf() with a format string that does not contain any conversion specifiers, gcc will call gets() or fgets() instead. > Maybe passing volatile pointers might be enough. You can't pass a volatile pointer to memset. DES -- Dag-Erling Smørgrav - [email protected] _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "[email protected]"
