Skip to content

Conversation

devnexen
Copy link
Member

because of the unix code path, UB is avoided beforehand thus errors with 0 mask for the windows api is unlikely.

because of the unix code path, UB is avoided beforehand thus errors
with 0 mask for the windows api is unlikely.
@devnexen
Copy link
Member Author

nvm pretty pointless, with clang it s the same as unix and unexpected is no-op with msvc..

@devnexen devnexen closed this Jan 19, 2025
@cmb69
Copy link
Member

cmb69 commented Jan 19, 2025

with clang it s the same as unix

Is it? It looks like clang-cl actually takes the defined(_WIN32) path (I've put in an #error directive).

However, I don't think either return value is expected (or unexpected). It seems to me the comment "undefined behavior" is very misleading. It's just when BitScanForward() returns zero, index is undefined; should probably drop that comment altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants