-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
When support for lld was added in #75, this retain attribute was added. However this is causing warnings now when compiling with gcc-12:
/tmp/tmp.BhrhA5NZPe/projects/seL4_libs/libsel4test/include/sel4test/test.h:145:12: error: 'retain' attribute ignored [-Werror=attributes]
145 | struct testcase TEST_ ## _name = { \
| ^~~~~~~~
/tmp/tmp.BhrhA5NZPe/projects/seL4_libs/libsel4test/include/sel4test/test.h:155:73: note: in expansion of macro 'DEFINE_TEST_WITH_TYPE'
155 | #define DEFINE_TEST_BOOTSTRAP(_name, _description, _function, _enabled) DEFINE_TEST_WITH_TYPE(_name, _description, _function, BOOTSTRAP, _enabled)
| ^~~~~~~~~~~~~~~~~~~~~
/tmp/tmp.BhrhA5NZPe/projects/sel4test/apps/sel4test-driver/src/tests/syscall.c:237:5: note: in expansion of macro 'DEFINE_TEST_BOOTSTRAP'
237 | DEFINE_TEST_BOOTSTRAP(_test, "Basic " #_syscall "() testing", test_ ## _syscall, _enabled)
| ^~~~~~~~~~~~~~~~~~~~~
/tmp/tmp.BhrhA5NZPe/projects/sel4test/apps/sel4test-driver/src/tests/syscall.c:239:5: note: in expansion of macro 'GENERATE_SYSCALL_TEST_MAYBE'
239 | GENERATE_SYSCALL_TEST_MAYBE(_test, _syscall, _code, true)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/tmp.BhrhA5NZPe/projects/sel4test/apps/sel4test-driver/src/tests/syscall.c:245:1: note: in expansion of macro 'GENERATE_SYSCALL_TEST'
245 | GENERATE_SYSCALL_TEST(SYSCALL0000, seL4_Yield,
| ^~~~~~~~~~~~~~~~~~~~~
/tmp/tmp.BhrhA5NZPe/projects/seL4_libs/libsel4test/include/sel4test/test.h:145:12: error: 'retain' attribute ignored [-Werror=attributes]
145 | struct testcase TEST_ ## _name = { \
| ^~~~~~~~
There doesn't seem to be a way to reliably test if gcc supports the retain attribute as __has_attribute(retain) returns 1 anyway.
Is there an alternative approach here? (ping @heshamelmatary)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels