From: Sam James <sam@gentoo.org>
To: git@vger.kernel.org
Subject: Build failure with -std=gnu23 (GCC 15 default)
Date: Sat, 16 Nov 2024 23:18:17 +0000 [thread overview]
Message-ID: <87ed3apy2u.fsf@gentoo.org> (raw)
Hi,
Upcoming GCC 15 defaults to -std=gnu23. git-2.47.0 fails to build as
follows:
```
builtin/index-pack.c:97:8: error: expected ‘{’ before ‘thread_local’
97 | struct thread_local {
| ^~~~~~~~~~~~
builtin/index-pack.c:120:15: error: expected ‘{’ before ‘thread_local’
120 | static struct thread_local nothread_data;
| ^~~~~~~~~~~~
builtin/index-pack.c:151:15: error: expected ‘{’ before ‘thread_local’
151 | static struct thread_local *thread_data;
| ^~~~~~~~~~~~
```
There may be more issues, but at the very least thread_local became a
proper keyword in C23, so that will need renaming.
It should be possible to reproduce these with older GCC (and Clang) with
-std=gnu23 or -std=c23 set manually.
thanks,
sam
next reply other threads:[~2024-11-16 23:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-16 23:18 Sam James [this message]
2024-11-17 1:31 ` [PATCH 0/2] C23 compatibility brian m. carlson
2024-11-17 1:31 ` [PATCH 1/2] index-pack: rename struct thread_local brian m. carlson
2024-11-17 1:31 ` [PATCH 2/2] reflog: rename unreachable brian m. carlson
2024-11-17 2:43 ` [PATCH 0/2] C23 compatibility Sam James
2024-11-18 7:45 ` Patrick Steinhardt
2024-11-18 9:58 ` Jeff King
2024-11-18 22:11 ` brian m. carlson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ed3apy2u.fsf@gentoo.org \
--to=sam@gentoo.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.