Commit Graph

3 Commits

Author SHA1 Message Date
Rui Ueyama
44bba965cb Add _Bool type
_Bool isn't just a 1-bit integer because when you convert a value
to bool, the result is 1 if the original value is non-zero. This
is contrary to the other small integral types, e.g. char, as you
can see below:

  char x  = 256; // x is 0
  _Bool y = 256; // y is 1
2020-12-07 12:00:05 +09:00
Rui Ueyama
f46370ef98 Add long long as an alias for long 2020-12-07 11:51:20 +09:00
Rui Ueyama
287906abb8 Handle complex type declarations correctly
chibicc can now read complex type declarations such as below.

  long x;
  long int x;
  int long x;
  short x;
  short int x;
  int short x;
  long long x;
  long long int x;
2020-12-07 11:51:20 +09:00