diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-22 16:53:40 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-22 16:53:40 +0000 |
commit | d2d39e093698106fd3647a32bcf75671e1f77872 (patch) | |
tree | 9e6cc52ea62e2e8f7e22e2dd2c053cdc0084a8f3 /libiberty/vasprintf.c | |
parent | bbd132bb233341da50b7f6463a1aa242d1d150b4 (diff) | |
download | gcc-d2d39e093698106fd3647a32bcf75671e1f77872.tar.gz |
* cplus-dem.c (gnu_special): Don't get confused by .<digits>
strings that are not actually lengths.
* config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES
since it gets built automatically
* vasprintf.c (int_vasprintf): Increase buffer size for float/double
values.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18171 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/vasprintf.c')
-rw-r--r-- | libiberty/vasprintf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libiberty/vasprintf.c b/libiberty/vasprintf.c index 38e84680461..da83db2ea75 100644 --- a/libiberty/vasprintf.c +++ b/libiberty/vasprintf.c @@ -74,7 +74,7 @@ int_vasprintf (result, format, args) } while (strchr ("hlL", *p)) ++p; - /* Should be big enough for any format specifier except %s. */ + /* Should be big enough for any format specifier except %s and floats. */ total_width += 30; switch (*p) { @@ -93,6 +93,9 @@ int_vasprintf (result, format, args) case 'g': case 'G': (void) va_arg (ap, double); + /* Since an ieee double can have an exponent of 307, we'll + make the buffer wide enough to cover the gross case. */ + total_width += 307; break; case 's': total_width += strlen (va_arg (ap, char *)); |