diff options
author | Fred Fish <fnf@specifix.com> | 1993-06-12 22:03:27 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1993-06-12 22:03:27 +0000 |
commit | ce13daa7df1ac4343d6597e6e04c87617408a3fe (patch) | |
tree | e2886e3dc0deffcd4c567f9e70ec57a2e53306a9 /gdb/c-exp.y | |
parent | 998f2ef343650f723ead7f0232b40cbe4d8564e8 (diff) | |
download | gdb-ce13daa7df1ac4343d6597e6e04c87617408a3fe.zip gdb-ce13daa7df1ac4343d6597e6e04c87617408a3fe.tar.gz gdb-ce13daa7df1ac4343d6597e6e04c87617408a3fe.tar.bz2 |
* Makefile.in (VERSION): Bump to 4.9.2.
* c-valprint.c (c_val_print): For array of chars printed with
string syntax, don't print the address of the array. From
bothner@cygnus.com.
* c-exp.y (yylex): Recognize '.' as indicating a floating point
number regardless of the radix. From wilson@cygnus.com.
* valprint.c (set_input_radix_1, set_output_radix_1): New
prototypes and functions that do the actual radix setting work.
* valprint.c (set_radix, set_output_radix, set_input_radix):
Rewrite to use set_input_radix_1 and set_output_radix_1.
* valprint.c (initialize_valprint): Enable commands to
independently set and show input and output radices.
* valprint.c (show_radix): New prototype and function that
handles separate input and output radices.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 654bf75..0394ae9 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1247,9 +1247,14 @@ yylex () for (;; ++p) { + /* This test includes !hex because 'e' is a valid hex digit + and thus does not indicate a floating point number when + the radix is hex. */ if (!hex && !got_e && (*p == 'e' || *p == 'E')) got_dot = got_e = 1; - else if (!hex && !got_dot && *p == '.') + /* This test does not include !hex, because a '.' always indicates + a decimal floating point number regardless of the radix. */ + else if (!got_dot && *p == '.') got_dot = 1; else if (got_e && (p[-1] == 'e' || p[-1] == 'E') && (*p == '-' || *p == '+')) |