Skip to content

Conversation

@jcking
Copy link
Contributor

@jcking jcking commented Jun 6, 2025

glibc adds __attribute__((nothrow)) to its declarations, at least for those related to malloc. glibc has yet to introduce free_sized, but when it does it would cause compilation errors. This is due to the fact that if a function declarations has __attribute__((nothrow)) and it is re-declared or implemented in C++ it must also have __attribute__((nothrow)) or noexcept, otherwise the compilation will fail.

This is a follow up to #6598.

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jun 6, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase febad6a38074dbd0055899109c1d89b40f8e4868 --onto 9b9dd8546a123d746580649b239f26c26d370d20. You can force Mathlib CI using the force-mathlib-ci label. (2025-06-06 15:25:44)

@Kha Kha added this pull request to the merge queue Jun 13, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jun 13, 2025
glibc adds `__attribute__((nothrow))` to its declarations, at least for
those related to malloc. glibc has yet to introduce `free_sized`, but
when it does it would cause compilation errors. This is due to the fact
that if a function declarations has `__attribute__((nothrow))` and it is
re-declared or implemented in C++ it must also have
`__attribute__((nothrow))` or `noexcept`, otherwise the compilation will
fail.

This is a follow up to #6598.

Signed-off-by: Justin King <[email protected]>
Merged via the queue into leanprover:master with commit 0d0da76 Jun 13, 2025
14 checks passed
algebraic-dev pushed a commit to algebraic-dev/lean4 that referenced this pull request Jun 18, 2025
…prover#8661)

glibc adds `__attribute__((nothrow))` to its declarations, at least for
those related to malloc. glibc has yet to introduce `free_sized`, but
when it does it would cause compilation errors. This is due to the fact
that if a function declarations has `__attribute__((nothrow))` and it is
re-declared or implemented in C++ it must also have
`__attribute__((nothrow))` or `noexcept`, otherwise the compilation will
fail.

This is a follow up to leanprover#6598.

Signed-off-by: Justin King <[email protected]>
wkrozowski pushed a commit to wkrozowski/lean4 that referenced this pull request Jun 24, 2025
…prover#8661)

glibc adds `__attribute__((nothrow))` to its declarations, at least for
those related to malloc. glibc has yet to introduce `free_sized`, but
when it does it would cause compilation errors. This is due to the fact
that if a function declarations has `__attribute__((nothrow))` and it is
re-declared or implemented in C++ it must also have
`__attribute__((nothrow))` or `noexcept`, otherwise the compilation will
fail.

This is a follow up to leanprover#6598.

Signed-off-by: Justin King <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants