Rui Ueyama
d85fc4ffcf
Add #include <...>
2020-12-07 12:00:06 +09:00
Rui Ueyama
8f6f7925a0
Add macro stringizing operator (#)
2020-12-07 12:00:06 +09:00
Rui Ueyama
dec3b3fa02
Add zero-arity funclike #define
2020-12-07 12:00:06 +09:00
Rui Ueyama
acce00228b
Do not expand a token more than once for the same objlike macro
2020-12-07 12:00:06 +09:00
Rui Ueyama
bf6ff928ad
Add #if and #endif
2020-12-07 12:00:06 +09:00
Rui Ueyama
ec149f64d2
Skip extra tokens after `#include "..."`
2020-12-07 12:00:06 +09:00
Rui Ueyama
d367510fcc
Add #include "..."
2020-12-07 12:00:06 +09:00
Rui Ueyama
146c7b3dd4
Add the null directive
2020-12-07 12:00:06 +09:00
Rui Ueyama
1e1ea39dad
Add a do-nothing preprocessor
2020-12-07 12:00:06 +09:00
Rui Ueyama
8b726b5489
Run "ld" unless -c is given
2020-12-07 12:00:06 +09:00
Rui Ueyama
140b43358c
Run "as" command unless -S is given
2020-12-07 12:00:06 +09:00
Rui Ueyama
f3d96136f2
Split cc1 from compiler driver
2020-12-07 12:00:06 +09:00
Rui Ueyama
d06a8ac6e6
Add function pointer
2020-12-07 12:00:06 +09:00
Rui Ueyama
83f76ebb66
Add flonum +, -, * and /
2020-12-07 12:00:06 +09:00
Rui Ueyama
1e57f72d8a
Add floating-point constant
2020-12-07 12:00:06 +09:00
Rui Ueyama
1fad2595d6
Allow to omit parameter name in function declaration
2020-12-07 12:00:06 +09:00
Rui Ueyama
aaf10459d9
Add U, L and LL suffixes
2020-12-07 12:00:06 +09:00
Rui Ueyama
34ab83bdf4
Add unsigned integral types
2020-12-07 12:00:06 +09:00
Rui Ueyama
754a24fafc
Add va_start to support variadic functions
2020-12-07 12:00:06 +09:00
Rui Ueyama
58fc86137c
Allow to call a variadic function
2020-12-07 12:00:06 +09:00
Rui Ueyama
ee252e6ce7
Add do ... while
2020-12-07 12:00:06 +09:00
Rui Ueyama
9df51789e7
Add _Alignof and _Alignas
2020-12-07 12:00:06 +09:00
Rui Ueyama
cd688a89b8
Allow to initialize struct flexible array member
2020-12-07 12:00:06 +09:00
Rui Ueyama
1eae5ae367
Handle union initializers for global variable
2020-12-07 12:00:06 +09:00
Rui Ueyama
e9d2c46ab3
Handle struct initializers for local variables
2020-12-07 12:00:06 +09:00
Rui Ueyama
0d717373cc
Add string literal initializer
2020-12-07 12:00:06 +09:00
Rui Ueyama
ae0a37dc4b
Initialize excess array elements with zero
2020-12-07 12:00:06 +09:00
Rui Ueyama
22dd560ecf
Support local variable initializers
2020-12-07 12:00:06 +09:00
Rui Ueyama
447ee098c5
Add ?: operator
2020-12-07 12:00:06 +09:00
Rui Ueyama
d0c0cb74b2
Add <<, >>, <<= and >>=
2020-12-07 12:00:06 +09:00
Rui Ueyama
044d9ae07b
Add switch-case
2020-12-07 12:00:06 +09:00
Rui Ueyama
3c83dfd8af
Add continue statement
2020-12-07 12:00:06 +09:00
Rui Ueyama
b3047f2317
Add break statement
2020-12-07 12:00:06 +09:00
Rui Ueyama
6116cae4c4
Add goto and labeled statement
2020-12-07 12:00:06 +09:00
Rui Ueyama
61a1055120
Add a notion of an incomplete struct type
2020-12-07 12:00:06 +09:00
Rui Ueyama
29ed294906
Add a notion of an incomplete array type
2020-12-07 12:00:06 +09:00
Rui Ueyama
f30f78175c
Add && and ||
2020-12-07 12:00:06 +09:00
Rui Ueyama
86440068b4
Add &, |, ^, &=, |= and ^=
2020-12-07 12:00:06 +09:00
Rui Ueyama
daa739817c
Add % and %=
2020-12-07 12:00:06 +09:00
Rui Ueyama
46a96d6862
Add ~ operator
2020-12-07 12:00:06 +09:00
Rui Ueyama
6b88bcb306
Add ! operator
2020-12-07 12:00:06 +09:00
Rui Ueyama
7df934d2b6
Add hexadecimal, octal and binary number literals
2020-12-07 12:00:06 +09:00
Rui Ueyama
736232f3d6
Support file-scope functions
2020-12-07 12:00:05 +09:00
Rui Ueyama
48ba2656fe
Add enum
2020-12-07 12:00:05 +09:00
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
fdc80bc6b5
Handle function argument type conversion
2020-12-07 12:00:05 +09:00
Rui Ueyama
8b430a6c5f
Implement usual arithmetic conversion
2020-12-07 12:00:05 +09:00
Rui Ueyama
cfc4fa94c1
Add type cast
2020-12-07 12:00:05 +09:00
Rui Ueyama
8c3503bb94
Add void type
2020-12-07 11:51:20 +09:00
Rui Ueyama
74e3acc296
Add function declaration
2020-12-07 11:51:20 +09:00