On Tue, May 14, 2024 at 6:08 PM Abhinav Saxena wrote:
>
> Change the macro argument 'fd' to '(fd)' to avoid potential precedence
> issues. Without parentheses, the macro expansion could lead to
> unexpected behavior when used with an expression having different
> precedence levels.
>
> Example Cod
Change the macro argument 'fd' to '(fd)' to avoid potential precedence
issues. Without parentheses, the macro expansion could lead to
unexpected behavior when used with an expression having different
precedence levels.
Example Code:
#define CALC_SQR_BAD(x) (x*x)
#define CALC_SQR_GOOD(x) (