diff options
author | Patrick Palka <ppalka@redhat.com> | 2022-11-14 21:28:58 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2022-11-14 21:28:58 -0500 |
commit | fce38b7d13ae625301571dcd84f3774ddaa6ed04 (patch) | |
tree | f82f76f38c1615ac1d8bed0da24dea4b3993e996 /gcc/fortran | |
parent | 080b4cf6bd8622c7dff6299f9103184d518ca93f (diff) | |
download | gcc-fce38b7d13ae625301571dcd84f3774ddaa6ed04.zip gcc-fce38b7d13ae625301571dcd84f3774ddaa6ed04.tar.gz gcc-fce38b7d13ae625301571dcd84f3774ddaa6ed04.tar.bz2 |
c++: init_priority and SUPPORTS_INIT_PRIORITY [PR107638]
The commit r13-3706-gd0a492faa6478c for fixing the result of
__has_attribute(init_priority) causes a bootstrap failure on hppa64-hpux
due to assuming the macro SUPPORTS_INIT_PRIORITY expands to a simple
constant, but on this target the macro is defined as
#define SUPPORTS_INIT_PRIORITY (TARGET_GNU_LD ? 1 : 0)
(where TARGET_GNU_LD expands to something in terms of global_options)
which means we can't use the macro to conditionally exclude the entry
for init_priority when defining the cxx_attribute_table.
So instead of trying to exclude init_priority from the attribute table,
this patch just makes __has_attribute handle init_priority specially.
PR c++/107638
gcc/c-family/ChangeLog:
* c-lex.cc (c_common_has_attribute): Return 1 for init_priority
iff SUPPORTS_INIT_PRIORITY.
gcc/cp/ChangeLog:
* tree.cc (cxx_attribute_table): Don't conditionally exclude
the init_priority entry.
(handle_init_priority_attribute): Remove ATTRIBUTE_UNUSED.
Return error_mark_node if !SUPPORTS_INIT_PRIORITY.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions