capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
http://www.capstone-engine.org
7.61k stars 1.56k forks source link

Do not use 0b prefix, not supported on old compilers #2306

Closed trufae closed 7 months ago

trufae commented 7 months ago

Your checklist for this pull request

Detailed description

capstone-v5 doesnt compile on gcc4, the compiler shipped in macos 10.4

Test plan

...

Closing issues

...

XVilka commented 7 months ago

There are also 0b prefixes used in the next branch.

trufae commented 7 months ago

Is the next branch suposed to be portable to gcc<5? 0b prefix makes the code way more readable, but maybe if you want portability a define is the best option. Wont make a pr for next because i’m not using that branch yet and cs5 is kind of whats packaged everywhere right now, and some OSes like haiku or tiger still ship those old compilers

aquynh commented 7 months ago

This should be merged, and cherry-picked to "next" as well.

Rot127 commented 7 months ago

@aquynh @kabeor Please check. We need one more approval for merging.

kabeor commented 7 months ago

LGTM. Thanks!

Todo: cherry pick to 'next' branch.

Rot127 commented 7 months ago

Todo: cherry pick to 'next' branch.

@trufae Would you mind doing this if you have time? If not it is fine, but it would be of great help.