Go to file
Martin Sebor 5d93da1d11 PR middle-end/78703 -fprintf-return-value floating point handling incorrect in locales with a mulltibyte decimal point
gcc/ChangeLog:
	PR middle-end/78703
	* gimple-ssa-sprintf.c (struct result_range): Add likely and
	unlikely counters.
	(struct format_result): Replace number_chars, number_chars_min,
	and number_chars_max with a single member of struct result_range.
	Remove bounded.
	(format_result::operator+=): Adjust.
	(struct fmtresult): Remove bounded.  Handle likely and unlikely
	counters.
	(fmtresult::adjust_for_width_or_precision): New function.
	(fmtresult:type_max_digits): New function.
	(bytes_remaining): Handle likely and unlikely counters.
	(min_bytes_remaining): Remove.
	(format_percent): Simplify.
	(format_integer, format_floating): Set likely and unlikely counters.
	(get_string_length, format_character, format_string): Same.
	(format_plain, should_warn_p): New function.
	(maybe_warn): Call should_warn_p.  Update diagnostic messages
	and handle those for all directives, including plain strings.
	(format_directive): Handle likely and unlikely counters.
	Remove unnecessary quoting from diagnostics.  Add an informational
	note.
	(add_bytes): Remove.
	(pass_sprintf_length::compute_format_length): Simplify.
	(try_substitute_return_value): Handle likely and unlikely counters.

gcc/testsuite/ChangeLog:

	PR middle-end/78703
	* gcc.dg/format/pr78569.c: Adjust.
	* gcc.dg/tree-ssa/builtin-snprintf-warn-2.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-2.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-5.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-2.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-4.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-6.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-7.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-9.c: Same.
	* gcc.dg/tree-ssa/builtin-sprintf.c: Same.

From-SVN: r244953
2017-01-26 14:14:18 -07:00
config ChangeLog: Fix relative path in my entry. 2017-01-26 17:50:50 +01:00
contrib update-copyright.py: Add libhsail-rt to self.default_dirs and call self.add_dir on it. 2017-01-26 09:26:48 +01:00
fixincludes
gcc PR middle-end/78703 -fprintf-return-value floating point handling incorrect in locales with a mulltibyte decimal point 2017-01-26 14:14:18 -07:00
gnattools
gotools
include Brig front-end 2017-01-24 13:45:56 +01:00
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcilkrts
libcpp * da.po: Update. 2017-01-23 22:28:03 +00:00
libdecnumber
libffi
libgcc op-common.h (_FP_MUL, [...]): Add /* FALLTHRU */ comments. 2017-01-24 23:32:30 +01:00
libgfortran
libgo runtime: fix setting of isarchive 2017-01-26 19:07:54 +00:00
libgomp * testsuite/lib/libgomp.exp 2017-01-26 20:37:08 +01:00
libhsail-rt update-copyright.py: Add libhsail-rt to self.default_dirs and call self.add_dir on it. 2017-01-26 09:26:48 +01:00
libiberty
libitm
libmpx
libobjc
liboffloadmic
libquadmath
libsanitizer * configure.tgt: Enable tsan and lsan on powerpc64{,le}-*-linux*. 2017-01-24 09:19:37 +01:00
libssp
libstdc++-v3 PR libstdc++/70607 revert recent changes to <tr1/complex> 2017-01-26 19:40:02 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib 2017-01-22 Matthias Klose <doko@ubuntu.com> 2017-01-22 18:07:04 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog ChangeLog: Move my last entry ... 2017-01-26 17:47:15 +01:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure Brig front-end 2017-01-24 13:45:56 +01:00
configure.ac Brig front-end 2017-01-24 13:45:56 +01:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def Brig front-end 2017-01-24 13:45:56 +01:00
Makefile.in Brig front-end 2017-01-24 13:45:56 +01:00
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.