Commit 265cee55 authored by Paul Eggert's avatar Paul Eggert
Browse files

Work around GCC bug 80776 on Fedora 27 x86

* src/buffer.c (Fgenerate_new_buffer_name): Pacify GCC 7.2.1
20170915 (Red Hat 7.2.1-2) on i686 with -Wformat-overflow -O2 by
using XINT rather than XFASTINT and by adding an eassume.  This
works around GCC bug 80776.
parent dc7a97fb
......@@ -1087,7 +1087,11 @@ is first appended to NAME, to speed up finding a non-existent buffer. */)
else
{
char number[sizeof "-999999"];
int i = XFASTINT (Frandom (make_number (999999)));
/* Use XINT instead of XFASTINT to work around GCC bug 80776. */
int i = XINT (Frandom (make_number (1000000)));
eassume (0 <= i && i < 1000000);
AUTO_STRING_WITH_LEN (lnumber, number, sprintf (number, "-%d", i));
genbase = concat2 (name, lnumber);
if (NILP (Fget_buffer (genbase)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment