Implement no_stack_protector attribute.
authorMartin Liska <mliska@suse.cz>
Fri, 15 May 2020 12:42:12 +0000 (14:42 +0200)
committerMartin Liska <mliska@suse.cz>
Thu, 22 Oct 2020 08:10:50 +0000 (10:10 +0200)
commit346b302d09c1e6db56d9fe69048acb32fbb97845
treedc5b9b9594325c30b81f676d19c75dbc3a34343f
parent5a99796b85c93fe9d61ee52fc3a38b8698709479
Implement no_stack_protector attribute.

gcc/ChangeLog:

2020-05-18  Martin Liska  <mliska@suse.cz>

PR c/94722
* cfgexpand.c (stack_protect_decl_phase):
Guard with lookup_attribute("no_stack_protector") at
various places.
(expand_used_vars): Likewise here.
* doc/extend.texi: Document no_stack_protector attribute.

gcc/ada/ChangeLog:

2020-05-18  Martin Liska  <mliska@suse.cz>

PR c/94722
* gcc-interface/utils.c (handle_no_stack_protect_attribute):
New.
(handle_stack_protect_attribute): Add error message for a
no_stack_protector function.

gcc/c-family/ChangeLog:

2020-05-18  Martin Liska  <mliska@suse.cz>

PR c/94722
* c-attribs.c (handle_no_stack_protect_function_attribute): New.
(handle_stack_protect_attribute): Add error message for a
no_stack_protector function.

gcc/testsuite/ChangeLog:

2020-05-18  Martin Liska  <mliska@suse.cz>

PR c/94722
* g++.dg/no-stack-protector-attr-2.C: New test.
* g++.dg/no-stack-protector-attr-3.C: New test.
* g++.dg/no-stack-protector-attr.C: New test.
gcc/ada/gcc-interface/utils.c
gcc/c-family/c-attribs.c
gcc/cfgexpand.c
gcc/doc/extend.texi
gcc/testsuite/g++.dg/no-stack-protector-attr-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/no-stack-protector-attr-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/no-stack-protector-attr.C [new file with mode: 0644]