aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lex.l
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-02-23 18:43:41 +0000
committerDaniel Jacobowitz <drow@false.org>2006-02-23 18:43:41 +0000
commita6205f535ae295e644a1ec53fa130e2785adfb58 (patch)
tree7ea3cdabe1196869e61db644155a93fb9ad84db4 /gdb/ada-lex.l
parent0f0b8dcdc328692f3b92cf2034b8866f0c01fa33 (diff)
downloadgdb-a6205f535ae295e644a1ec53fa130e2785adfb58.zip
gdb-a6205f535ae295e644a1ec53fa130e2785adfb58.tar.gz
gdb-a6205f535ae295e644a1ec53fa130e2785adfb58.tar.bz2
* doublest.h: Conditionalize DOUBLEST on PRINTF_HAS_LONG_DOUBLE
also. (DOUBLEST_FORMAT): Rename to DOUBLEST_PRINT_FORMAT. (DOUBLEST_SCAN_FORMAT): New. * ada-lex.l (PRINTF_HAS_LONG_DOUBLE): Remove redefinitions. (processReal): Use DOUBLEST_SCAN_FORMAT. * c-exp.y (parse_number): Likewise. * jv-exp.y (parse_number): Likewise. * objc-exp.y (parse_number): Likewise. * p-exp.y (parse_number): Likewise.
Diffstat (limited to 'gdb/ada-lex.l')
-rw-r--r--gdb/ada-lex.l18
1 files changed, 1 insertions, 17 deletions
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 156e0b8..b25264c 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -432,26 +432,10 @@ processInt (const char *base0, const char *num0, const char *exp0)
return INT;
}
-#if defined (PRINTF_HAS_LONG_DOUBLE)
-# undef PRINTF_HAS_LONG_DOUBLE
-# define PRINTF_HAS_LONG_DOUBLE 1
-#else
-# define PRINTF_HAS_LONG_DOUBLE 0
-#endif
-
static int
processReal (const char *num0)
{
-#if defined (PRINTF_HAS_LONG_DOUBLE)
- if (sizeof (DOUBLEST) > sizeof (double))
- sscanf (num0, "%Lg", &yylval.typed_val_float.dval);
- else
-#endif
- {
- double temp;
- sscanf (num0, "%lg", &temp);
- yylval.typed_val_float.dval = temp;
- }
+ sscanf (num0, DOUBLEST_SCAN_FORMAT, &yylval.typed_val_float.dval);
yylval.typed_val_float.type = type_float ();
if (sizeof(DOUBLEST) >= TARGET_DOUBLE_BIT / TARGET_CHAR_BIT)