Commit 02f1ef40 by Martin Sebor Committed by Martin Sebor

PR middle-end/78703 - -fprintf-return-value floating point handling incorrect...

PR middle-end/78703 - -fprintf-return-value floating point handling incorrect in locales with a mulltibyte decimal point
	* gimple-ssa-sprintf.c (warn_level): New global.
	(format_integer): Use it here and throughout the rest of the file.
	Use the same switch to compute sign as base.
	(maybe_warn): New function.
	(format_directive): Factor out warnings into maybe_warn.
	Add debugging output.  Use warn_level.
	(add_bytes): Use warn_level.
	(pass_sprintf_length::compute_format_length): Add debugging output.
	(try_substitute_return_value): Same.
	(pass_sprintf_length::handle_gimple_call): Set and use warn_level.

From-SVN: r244847
parent a151e93b
2017-01-23 Martin Sebor <msebor@redhat.com> 2017-01-23 Martin Sebor <msebor@redhat.com>
PR middle-end/78703 PR middle-end/78703
* gimple-ssa-sprintf.c (warn_level): New global.
(format_integer): Use it here and throughout the rest of the file.
Use the same switch to compute sign as base.
(maybe_warn): New function.
(format_directive): Factor out warnings into maybe_warn.
Add debugging output. Use warn_level.
(add_bytes): Use warn_level.
(pass_sprintf_length::compute_format_length): Add debugging output.
(try_substitute_return_value): Same.
(pass_sprintf_length::handle_gimple_call): Set and use warn_level.
PR middle-end/78703
* gimple-ssa-sprintf.c (struct format_result): Remove constant member. * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
(struct fmtresult, format_integer, format_floating): Adjust. (struct fmtresult, format_integer, format_floating): Adjust.
(get_string_length, format_string,format_directive): Same. (get_string_length, format_string,format_directive): Same.
......
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