blob: 0cabb1c7452f118fde6d90f75973af4729a8383d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
%module cpp14_binary_integer_literals
#if 0b100 < 4
# error binary constant in preprocessor expression failed
#endif
%inline %{
int b1 = 0b1;
int b2 = 0b10;
long b3 = 0b11l;
unsigned long b4 = 0b100ul;
unsigned long b5 = 0B101UL;
#define b6 0b110
const int b7 = 0b111;
%}
%constant int b8 = 0b1000;
|