Skip to content

vrtd headers: Check for __STDC_VERSION_STDBIT_H__ when importing stdbit.h - #217

Merged
quetric merged 3 commits into
Xilinx:devfrom
serbuvlad:fix/cpp-stdbit
Sep 8, 2026
Merged

vrtd headers: Check for __STDC_VERSION_STDBIT_H__ when importing stdbit.h#217
quetric merged 3 commits into
Xilinx:devfrom
serbuvlad:fix/cpp-stdbit

Conversation

@serbuvlad

Copy link
Copy Markdown
Contributor

Standard C/C++ allows stdbit.h to be importable but not define anything (this occurs in the default C++ compiler on Ubuntu 26.04).

Therefore, checking for the header is not enough to decide on whether to use these features or fallback to the manual implementation. __STDC_VERSION_STDBIT_H__ must be defined and have a particular value for the features to exist.

This PR also fixes a bug in the fallback code for bit_ceil when n == 1.

Signed-off-by: Vlad-Gabriel Șerbu <vlad_gabriel.serbu@upb.ro>
Signed-off-by: Vlad-Gabriel Șerbu <vlad_gabriel.serbu@upb.ro>
Signed-off-by: Vlad-Gabriel Șerbu <vlad_gabriel.serbu@upb.ro>
@quetric
quetric merged commit 1ae9b77 into Xilinx:dev Sep 8, 2026
3 checks passed
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.

2 participants