15.2.39 Zero_call_used_regs Function Attribute

The zero_call_used_regs(choice) attribute instructs the compiler to zero out a subset of the "call-used" registers associated with each function when those functions return. Call-used registers are those registers that can be altered by a function call. This action can enhance program security by reducing the risk of return-oriented programming (ROP) attacks or preventing information leakage through registers.

The choice argument to this attribute is identical to that for the -fzero-call-used-regs option (see Zero-call-used-regs Option), which sets the default behavior for functions that do not use this attribute.