re PR c/67730 (No warning when returning NULL in void function)
authorMarek Polacek <polacek@redhat.com>
Wed, 30 Sep 2015 11:26:44 +0000 (11:26 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 30 Sep 2015 11:26:44 +0000 (11:26 +0000)
commitde8ddd5fb1eb0f61e304dda5044ef18a24a16f69
tree36db101171db6bb1d32a8f4bb020799de6660143
parent6ea2f74cf9dbee7a3e41d4c2bd3757a2ea303b8e
re PR c/67730 (No warning when returning NULL in void function)

PR c/67730
* c-typeck.c (c_finish_return): Use the expansion point location for
certain "return with value" warnings.

* gcc.dg/pr67730.c: New test.

From-SVN: r228286
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr67730.c [new file with mode: 0644]