On Sat, 11 Mar 2023 11:18:43 +0100, Martin Jansa via tz wrote:
> I was building tz with gcc-13 and noticed that without explicit -std=c2x it
> fails to build 2022g version with:
> ```
> zic.c:462:1: warning: ‘noreturn’ attribute ignored [-Wattributes]
> 462 | static ATTRIBUTE_NORETURN void
> | ^~~~~~
> zic.c:462:27: error: expected identifier or ‘(’ before ‘void’
> 462 | static ATTRIBUTE_NORETURN void
> | ^~~~
> ```
Try swapping the order of ATTRIBUTE_NORETURN and "static". C23
attributes are supposed to come first (unlike gcc-style attributes)
similar to C++.
Thanks, you're right.
And when I've started to do that instead of my work around ("if __has_c_attribute(noreturn) && 202000 <= __STDC_VERSION__") I've forked tz on github to send it as PR and discovered that it's already resolved there in version newer than 2022g I was using locally, don't know how I've overlooked that before (probably because I was looking more at private.h and less on zic.c/zdump.c).
It's resolved in:
I'll at least backport it to OpenEmbedded now :).
Regards,