Bernd Walter <ti...@cicely7.cicely.de> 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 - d...@des.no _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"