PR middle-end/78703 - -fprintf-return-value floating point handling incorrect...
authorMartin Sebor <msebor@redhat.com>
Tue, 24 Jan 2017 00:55:19 +0000 (00:55 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 24 Jan 2017 00:55:19 +0000 (17:55 -0700)
commit954b452ada953bcbc8d2f9ee802dfd74df079f8d
treeb0a68a7d37f5154d1428b9d0d44d3e8a329759d3
parent86b2a5583b9494d2e80803fd6e325e123516d9f0
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 (pass_sprintf_length::gate): Adjust formatting.
(fmtresult::operator+=): Outlined.
(struct fmtresult): Add ctors.
(struct conversion_spec): Rename...
(struct directive): ...to this.  Add and remove data members.
(directive::set_width, directive::set_precision): New functions.
(format_percent): Use fmtresult ctor.
(get_width_and_precision): Remove.
(format_integer): Make naming changes.  Avoid computing width and
precision.
(format_floating): Same.  Adjust indentation.
(format_character, format_none): New functions.
(format_string): Moved character handling to format_character.
(format_directive): Remove arguments, change return type.
(parse_directive): New function.
(pass_sprintf_length::compute_format_length): Move directive
parsing to parse_directive.

From-SVN: r244845
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c