* doublest.h (DOUBLEST): Use long double only if we can scan

it in.  Undefine HAVE_LONG_DOUBLE otherwise.
(DOUBLEST_FORMAT): New.
* c-exp.y (parse_number): Use it.
* jv-exp.y (parse_number): Likewise.
* objc-exp.y (parse_number): Likewise.
* p-exp.y (parse_number): Likewise.
* varobj.c (free_variable): Silence type-punning warnings.
* tui/tui-data.h (struct tui_list): Change type of list member.
* tui/tui-data.c: Remove no-longer-needed type casts.
(source_windows): Silence type-punning warnings.
* tui/tui-stack.c, tui/tui-win.c, tui/tui-winsource.c: Likewise.
This commit is contained in:
Alexandre Oliva
2006-02-14 18:45:14 +00:00
parent 92dd43fa3b
commit 96c1eda247
12 changed files with 43 additions and 84 deletions

View File

@@ -48,10 +48,15 @@ struct floatformat;
host's `long double'. In general, we'll probably reduce the precision of
any such values and print a warning. */
#ifdef HAVE_LONG_DOUBLE
#if defined HAVE_LONG_DOUBLE && defined SCANF_HAS_LONG_DOUBLE
typedef long double DOUBLEST;
# define DOUBLEST_FORMAT "%Lg"
#else
typedef double DOUBLEST;
# define DOUBLEST_FORMAT "%g"
/* If we can't scan or print long double, we don't want to use it
anywhere. */
# undef HAVE_LONG_DOUBLE
#endif
extern void floatformat_to_doublest (const struct floatformat *,