This is the mail archive of the
mailing list for the GCC project.
On 11/07/17 09:56, Jonathan Wakely wrote:
On 11 July 2017 at 17:51, Jonny Grant wrote:
snprintf (d, sizeof d, "%#02x", x & 0xff);
Should be: sizeof(d) ?
"The sizeof operator yields the size (in bytes) of its operand, which
may be an expression or the parenthesized name of a type."
So the parentheses are only required for a type, not an expression.
sizeof(d) is the same as sizeof d which is the same as
Great! I'm learning something new still it seems :)