Skip to content

pystrhex.c does not compile with older clang #148474

@jmroot

Description

@jmroot

Bug report

Bug description:

Fails with this error:

Python/pystrhex.c:81:26: error: cannot convert between vector values of different size ('v16u8' (vector of 16 'unsigned char' values) and 'int')
        v16u8 hi = (data >> 4) & mask_0f;
                    ~~~~ ^  ~

Newer clangs (circa Xcode 9 and later) apparently auto-convert the 4 on the RHS of the shift operator to a vector. This is easily fixed by doing an explicit splat as is done for other constants in this function.

CPython versions tested on:

3.15

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions