Skip to content
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

zend_ulong_ntz/zend_ulong_ntz little optimisation for windows. #17527

Closed
wants to merge 1 commit into from

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