Skip to content

CDRIVER-5889: Fix BSON_NORETURN for C23 standard #1859

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

Merged
1 commit merged into from Feb 11, 2025
Merged

CDRIVER-5889: Fix BSON_NORETURN for C23 standard #1859

1 commit merged into from Feb 11, 2025

Conversation

ghost
Copy link

@ghost ghost commented Feb 11, 2025

The new BSON_NORETURN macro has implementations for C11, C23, GCC, and a fallback. The C23 version was untested in CI, and led to CDRIVER-5889 when the about-to-be-released GCC 15 switched to the C23 standard as default.

Failures are also observed in normal libmongoc build with a new enough gcc and -DCMAKE_C_STANDARD=23

With this patch, all branches of the BSON_NORETURN definition are working.

Tested on 1.30.0 with a fresh gcc build from master, change 4abac2ffdb071ca9337e4f31fa79cd38df1ac7c3.

Needs to be cherry-picked for 1.x

The new BSON_NORETURN macro has implementations for C11, C23, GCC, and a fallback.
The C23 version was untested in CI, and led to CDRIVER-5889 when the about-to-be-released
GCC 15 switched to the C23 standard as default.

Failures are also observed in normal libmongoc build with a new enough gcc and -DCMAKE_C_STANDARD=23

With this patch, all branches of the BSON_NORETURN definition are working.
@ghost ghost requested a review from kevinAlbs February 11, 2025 18:36
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ghost ghost merged commit 0924826 into mongodb:master Feb 11, 2025
43 checks passed
kevinAlbs pushed a commit that referenced this pull request Feb 21, 2025
* Fix C23 version of BSON_NORETURN macro definition
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant