2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
commit947aa916c477d2d33759ba81d1deba3d218f5817
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Jan 2015 05:29:12 +0000 (15 05:29 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Jan 2015 05:29:12 +0000 (15 05:29 +0000)
tree491382b1163238c05c384ce06c8581bc06d76bfb
parentbf15bc7f731a8306f0fa7166f0f910a820c5d91b
2015-01-14  Marcos Diaz <marcos.diaz@tallertechnologies.com>

* common.opt: New option -fstack-protector-explicit.
* cfgexpand.c (SPCT_FLAG_EXPLICIT): New enum.
(stack_protect_decl_phase): Handle stack_protect attribute for
explicit stack protection requests.
(expand_used_vars): Similarly.
* doc/cpp.texi (__SSP_EXPLICIT__): Document predefined macro.
* doc/extend.texi: Add documentation for "stack_protect" attribute.
* doc/invoke.texi: Add documentation for -fstack-protector-explicit.

* c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
for the new option fstack-protector_explicit.
* c-common.c (c_common_attribute_table): Add stack_protect attribute.
(handle_stack_protect_attribute): New function.

* gcc.dg/stackprotectexplicit1.c: New test.
* g++.dg/stackprotectexplicit2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219633 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-cppbuiltin.c
gcc/cfgexpand.c
gcc/common.opt
gcc/doc/cpp.texi
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/stackprotectexplicit2.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/stackprotectexplicit1.c [new file with mode: 0644]