Skip to content

Support pure __builtin_bswap16 in switch cases#202

Open
sim642 wants to merge 4 commits into
developfrom
builtin_bswap_const
Open

Support pure __builtin_bswap16 in switch cases#202
sim642 wants to merge 4 commits into
developfrom
builtin_bswap_const

Conversation

@sim642

@sim642 sim642 commented Jan 9, 2026

Copy link
Copy Markdown
Member

This is used in Linux kernel.

It translates __builtin_bswap16(x) to (unsigned short)(((int)x << 8) | ((int)x >> 8))) in constant contexts like switch cases.

@sim642 sim642 added this to the 2.1.1 milestone Jun 11, 2026
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.

1 participant