[tz] Building tz with gcc-13

Martin Jansa martin.jansa at gmail.com
Mon Mar 13 21:02:02 UTC 2023


On Mon, Mar 13, 2023 at 9:40 PM Todd C. Miller <Todd.Miller at sudo.ws> wrote:

> 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:
https://github.com/eggert/tz/commit/9cfe9507fcc22cd4a0c4da486ea1c7f0de6b075f

I'll at least backport it to OpenEmbedded now :).

Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mm.icann.org/pipermail/tz/attachments/20230313/09ac2db8/attachment-0001.html>


More information about the tz mailing list