c.opt (-Wframe-address): New warning option.
authorMartin Sebor <msebor@redhat.com>
Sun, 2 Aug 2015 23:14:18 +0000 (23:14 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Sun, 2 Aug 2015 23:14:18 +0000 (17:14 -0600)
commit8423e57caae976cddbc1f9f68ebf6fef595cae83
tree97746f9a2a68398bc9ae1064c1bc4e81ce8b48ef
parent8ebca419e837774146ef77574580456107d7315b
c.opt (-Wframe-address): New warning option.

gcc/ChangeLog
2015-07-28  Martin Sebor  <msebor@redhat.com>

    * c-family/c.opt (-Wframe-address): New warning option.
    * doc/invoke.texi (Wframe-address): Document it.
    * doc/extend.texi (__builtin_frame_address, __builtin_return_address):
    Clarify possible effects of calling the functions with non-zero
    arguments and mention -Wframe-address.
    * builtins.c (expand_builtin_frame_address): Handle -Wframe-address.

gcc/testsuite/ChangeLog
2015-07-28  Martin Sebor  <msebor@redhat.com>

    * g++.dg/Wframe-address-in-Wall.C: New test.
    * g++.dg/Wframe-address.C: New test.
    * g++.dg/Wno-frame-address.C: New test.
    * gcc.dg/Wframe-address-in-Wall.c: New test.
    * gcc.dg/Wframe-address.c: New test.
    * gcc.dg/Wno-frame-address.c: New test.

From-SVN: r226480
12 files changed:
gcc/ChangeLog
gcc/builtins.c
gcc/c-family/c.opt
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/Wframe-address-in-Wall.C [new file with mode: 0644]
gcc/testsuite/g++.dg/Wframe-address.C [new file with mode: 0644]
gcc/testsuite/g++.dg/Wno-frame-address.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wframe-address-in-Wall.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wframe-address.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wno-frame-address.c [new file with mode: 0644]