This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: soft-fp: Use parentheses around macro arguments


"Joseph S. Myers" <joseph@codesourcery.com> writes:

> diff --git a/soft-fp/double.h b/soft-fp/double.h
> index 1e6283e..36a11a5 100644
> --- a/soft-fp/double.h
> +++ b/soft-fp/double.h
> @@ -90,21 +90,21 @@ union _FP_UNION_D
>  };
>  
>  # define FP_DECL_D(X)		_FP_DECL (2, X)
> -# define FP_UNPACK_RAW_D(X, val)	_FP_UNPACK_RAW_2 (D, X, val)
> -# define FP_UNPACK_RAW_DP(X, val)	_FP_UNPACK_RAW_2_P (D, X, val)
> -# define FP_PACK_RAW_D(val, X)	_FP_PACK_RAW_2 (D, val, X)
> +# define FP_UNPACK_RAW_D(X, val)	_FP_UNPACK_RAW_2 (D, X, (val))
> +# define FP_UNPACK_RAW_DP(X, val)	_FP_UNPACK_RAW_2_P (D, X, (val))
> +# define FP_PACK_RAW_D(val, X)	_FP_PACK_RAW_2 (D, (val), X)

Why do you need that?  Unless you play tricks with a macro expanding to
a comma it is impossible to put a literal comma in a macro argument
without hiding it inside parens.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]