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

Support for C23/C++14 constants with binary prefix 0b or 0B #1254

Open
winspool opened this issue Mar 14, 2024 · 0 comments
Open

Support for C23/C++14 constants with binary prefix 0b or 0B #1254

winspool opened this issue Mar 14, 2024 · 0 comments
Labels
C C compiler C++ C++ compiler enhancement

Comments

@winspool
Copy link
Contributor

I tried to compile the capstone engine with OW,
but that fails with many lines of:

Error! E1163: Invalid octal constant

The affected code locations are not octal constants, but lists of values in typedef enum
and the values are binary constants.
Examples

  ARM_T = 0b1000
  PPC_BO_TEST_CR = 0b10000

binary constants / binary literals with the binary prefix "0b" or "0B" are in the standards:

For C23, the requirement is listed in section 6.4.4.1 Integer Constants
For C++14, the requirement is listed in section 2.13.2 Integer literals [lex.icon]

@jmalak jmalak changed the title Support for constants with binary prefix 0b or 0B is missing Support for C23/C++14 constants with binary prefix 0b or 0B Mar 14, 2024
@jmalak jmalak added enhancement C C compiler C++ C++ compiler labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C C compiler C++ C++ compiler enhancement
Projects
None yet
Development

No branches or pull requests

2 participants