This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: change name `LONG_DOUBLE' to `LONGDOUBLE' in builtintypes
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 31 Jul 2003 13:37:43 -0700
- Subject: Re: Patch: change name `LONG_DOUBLE' to `LONGDOUBLE' in builtintypes
- References: <200307311957.PAA06763@caip.rutgers.edu>
"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
> Out convention in builtin-types.def and builtins.def is to name
> predeclared function signatures as BT_FN_<RETURN TYPE>_<ARGS...> So we
> get things like BT_FN_INT_LONG_FLOAT etc.
>
> I was trying to declare the signature for the C99 math functions
> lround and lrint, which is "long foo(double)" and works out to
> BT_FN_LONG_DOUBLE. But this conflicts with "long double foo(void)"
> which resolves to the same BT_FN_LONG_DOUBLE and already exists in
> builtin-types.def.
>
> My solution is to remove the hyphen from the type "long double" and
> make it one word LONGDOUBLE, just like we do for "long long"
> represented as LONGLONG. Then the type "long double" is
> distinguishable from the two types "long" and "double" in a signature
> sequence. Then later I can proceed to add the missing functions.
>
> Bootstrapped on sparc-sun-solaris2.7 (minus java), testsuite underway.
> Assuming no regressions, Ok for mainline?
OK but please add a comment to builtin-types.def explaining why
LONGDOUBLE is used for the "long double" type.
zw