CC5X (for the Microchip MCUs) compiles binary literals without problems.
SDCC V4.2.0 (for different 8 Bit MCUs) compiles also without problems. If I use the --std-c11 switch it complains: warning 261: binary integer constant requires C23 or later
If I use the --std-c2x switch it compiles without warnings.
So, binary literals are also included in the C standard?
Nice question again!
I learned that it does not make a difference if the case of 0x matches the (upper/lower)case of the hex literals after it.
> As an aside, the 052 is an octal number. You can learn a bit more about octals here, although they are
> rarely, if ever used in embedded systems.
Unless your "embedded system" is a PDP-8.
To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.
Please login (on the right) if you already have an account on this platform.
Otherwise, please use this form to register (free) an join one of the largest online community for Electrical/Embedded/DSP/FPGA/ML engineers: