]> git.ipfire.org Git - thirdparty/gcc.git/commit
c-family: Simplify attribute exclusion handling
authorAndrew Carlotti <andrew.carlotti@arm.com>
Mon, 6 Nov 2023 16:10:55 +0000 (16:10 +0000)
committerAndrew Carlotti <andrew.carlotti@arm.com>
Sat, 16 Dec 2023 00:38:42 +0000 (00:38 +0000)
commitb26bbd1be31666c2cc83527e89dba6684d97735b
tree87cfbe147a29fcfdaac46c203103eca395d10794
parent2c200a12c12f84a4d373aafaae8ff01fb0381b46
c-family: Simplify attribute exclusion handling

This patch changes the handling of mutual exclusions involving the
target and target_clones attributes to use the generic attribute
exclusion lists.  Additionally, the duplicate handling for the
always_inline and noinline attribute exclusion is removed.

The only change in functionality is the choice of warning message
displayed - due to either a change in the wording for mutual exclusion
warnings, or a change in the order in which different checks occur.

gcc/c-family/ChangeLog:

* c-attribs.cc (attr_always_inline_exclusions): New.
(attr_target_exclusions): Ditto.
(attr_target_clones_exclusions): Ditto.
(c_common_attribute_table): Add new exclusion lists.
(handle_noinline_attribute): Remove custom exclusion handling.
(handle_always_inline_attribute): Ditto.
(handle_target_attribute): Ditto.
(handle_target_clones_attribute): Ditto.

gcc/testsuite/ChangeLog:

* g++.target/i386/mvc2.C:
* g++.target/i386/mvc3.C:
gcc/c-family/c-attribs.cc
gcc/testsuite/g++.target/i386/mvc2.C
gcc/testsuite/g++.target/i386/mvc3.C