Skip to content

[libc++] libc++ doesn't compile with gcc 15 #117319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
killcerr opened this issue Nov 22, 2024 · 1 comment · Fixed by #137871
Closed

[libc++] libc++ doesn't compile with gcc 15 #117319

killcerr opened this issue Nov 22, 2024 · 1 comment · Fixed by #137871
Labels
build-problem libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Comments

@killcerr
Copy link

libc++ doesn't compile with GCC 15 because it comes with new GCC __decay built-in which is incompatible with libc++.
similar issue
the bug file

@github-actions github-actions bot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Nov 22, 2024
killcerr added a commit to killcerr/llvm-project that referenced this issue Nov 22, 2024
@frobtech
Copy link
Contributor

There are numerous other new built-ins that have the same issues. __decay is just the most widely-used of them.
#137704 lists all of them.

frobtech added a commit to frobtech/llvm-project that referenced this issue Apr 29, 2025
GCC 15 has added builtins for various C++ type traits that Clang
already had.  Since __has_builtin(...) now finds these, the #if
branches previously only used for Clang are now used for GCC 15.
However, GCC 15 requires that these builtins only be used in type
aliases, not in template aliases.

These changes follow the model of llvm#81386 where a previous GCC
version added builtins for __remove_cv and __remove_cvref.

Fixed: llvm#137704
Fixed: llvm#117319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-problem libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
3 participants