gcc treats functions like malloc and memset as builtin functions. malloc + memset in this fashion is equivalent to calloc, and so gcc transforms the function's body appropriately. Use -fno-builtin or -fno-builtin-FUNCTION to inhibit this optimization. It is a known limitation of gcc that -fno-builtin cannot be applied via function attributes or pragmas. Jeff