Skip to content

bpo-41617: check for bswap builtins before using#21942

Closed
jmroot wants to merge 1 commit into
python:masterfrom
jmroot:bswap16-check
Closed

bpo-41617: check for bswap builtins before using#21942
jmroot wants to merge 1 commit into
python:masterfrom
jmroot:bswap16-check

Conversation

@jmroot
Copy link
Copy Markdown
Contributor

@jmroot jmroot commented Aug 23, 2020

Don't assume clang always has them; use __has_builtin to check.

https://bugs.python.org/issue41617

Don't assume clang always has them; use __has_builtin to check.
jmroot added a commit to jmroot/cpython that referenced this pull request Aug 23, 2020
Don't assume clang always has them; use __has_builtin to check.
((__GNUC__ >= 5) || (__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)))
// Don't break compilers that don't know about __has_builtin
#ifndef __has_builtin
# define __has_builtin(x) 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I dislike mocking this function. So I wrote a different fix: PR #21949.

@vstinner
Copy link
Copy Markdown
Member

vstinner commented Sep 1, 2020

I merged the simple PR #22042 instead.

@vstinner vstinner closed this Sep 1, 2020
@jmroot jmroot deleted the bswap16-check branch September 19, 2020 03:40
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.

4 participants