r243684 - in /trunk/gcc: ChangeLog gimple-ssa-s...

msebor@gcc.gnu.org msebor@gcc.gnu.org
Thu Dec 15 04:35:00 GMT 2016


Author: msebor
Date: Thu Dec 15 04:35:31 2016
New Revision: 243684

URL: https://gcc.gnu.org/viewcvs?rev=243684&root=gcc&view=rev
Log:
PR middle-end/78519 - missing warning for sprintf %s with null pointer

gcc/ChangeLog:

	PR middle-end/78519
	* gimple-ssa-sprintf.c (format_string): Handle null pointers.
	(format_directive): Diagnose null pointer arguments.
	(pass_sprintf_length::handle_gimple_call): Diagnose null destination
	pointers.  Correct location of null format string in diagnostics.

gcc/testsuite/ChangeLog:

	PR middle-end/78519
	* gcc.dg/tree-ssa/builtin-sprintf-warn-7.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-8.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple-ssa-sprintf.c
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list