Commit Graph

54 Commits

Author SHA1 Message Date
Rui Ueyama 0a5d08c8f8 Complete stdatomic.h 2020-12-07 12:00:06 +09:00
Rui Ueyama f10bcebaa5 [GNU] Add #include_next 2020-12-07 12:00:06 +09:00
Rui Ueyama a6c662207d [GNU] Add "#pragma once" 2020-12-07 12:00:06 +09:00
Rui Ueyama d48d9e5ae3 Add include guard optimization 2020-12-07 12:00:06 +09:00
Rui Ueyama c0f0614e6b Cache file search results 2020-12-07 12:00:06 +09:00
Rui Ueyama 30520e5a7c Use hashmap for macro name lookup 2020-12-07 12:00:06 +09:00
Rui Ueyama b0109a30c9 Do not define __STDC_NO_VLA__ 2020-12-07 12:00:06 +09:00
Rui Ueyama 8f5ff07dc0 Add -include option 2020-12-07 12:00:06 +09:00
Rui Ueyama b3772845bd Add thread-local variable 2020-12-07 12:00:06 +09:00
Rui Ueyama 007e526ec5 [GNU] Support GCC-style variadic macro 2020-12-07 12:00:06 +09:00
Rui Ueyama 74ec9f6f39 Ignore #pragma 2020-12-07 12:00:06 +09:00
Rui Ueyama 083c27559e [GNU] Handle ,##__VA_ARG__ 2020-12-07 12:00:06 +09:00
Rui Ueyama 338144869f Add __VA_OPT__ 2020-12-07 12:00:06 +09:00
Rui Ueyama 3a10c8aa44 [GNU] Add __BASE_FILE__ macro 2020-12-07 12:00:06 +09:00
Rui Ueyama 922604ae1e [GNU] Add __TIMESTAMP__ macro 2020-12-07 12:00:06 +09:00
Rui Ueyama aaf20fb96e [GNU] Add line marker directive 2020-12-07 12:00:06 +09:00
Rui Ueyama c61c0d0025 Add #line 2020-12-07 12:00:06 +09:00
Rui Ueyama 238277714d Allow to concatenate regular string literals with L/u/U string literals 2020-12-07 12:00:06 +09:00
Rui Ueyama e4491b8115 Define __STDC_UTF_{16,32}__ macros
These predefined macros indicates that our u and U chars/strings
are UTF-16 and UTF-32-encoded, respectively.
2020-12-07 12:00:06 +09:00
Rui Ueyama 0e77f3dff8 [GNU] Add __COUNTER__ macro 2020-12-07 12:00:06 +09:00
Rui Ueyama e27417fcde Add __DATE__ and __TIME__ macros 2020-12-07 12:00:06 +09:00
Rui Ueyama be8b6f6d31 Add -U option 2020-12-07 12:00:06 +09:00
Rui Ueyama fc69f5c6f9 Add -D option 2020-12-07 12:00:06 +09:00
Rui Ueyama 3f2c2d5bca Tokenize numeric tokens as pp-numbers 2020-12-07 12:00:06 +09:00
Rui Ueyama ab4f1e1e19 Concatenate adjacent string literals 2020-12-07 12:00:06 +09:00
Rui Ueyama dc01f94900 Add __VA_ARGS__ 2020-12-07 12:00:06 +09:00
Rui Ueyama 6f17071885 Add __FILE__ and __LINE__ 2020-12-07 12:00:06 +09:00
Rui Ueyama 5f5a8507ff Add predefine macros such as __STDC__ 2020-12-07 12:00:06 +09:00
Rui Ueyama e7fdc2e3f1 Add #error 2020-12-07 12:00:06 +09:00
Rui Ueyama a1dd6213c8 Add -I<dir> option 2020-12-07 12:00:06 +09:00
Rui Ueyama d85fc4ffcf Add #include <...> 2020-12-07 12:00:06 +09:00
Rui Ueyama 8075582c21 Preserve newline and space during macro expansion 2020-12-07 12:00:06 +09:00
Rui Ueyama a8d76ad435 Replace remaining identifiers with 0 in macro constexpr 2020-12-07 12:00:06 +09:00
Rui Ueyama 5cb2f89e6a Add defined() macro operator 2020-12-07 12:00:06 +09:00
Rui Ueyama 8f561aed9b Add macro token-pasting operator (##) 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 1313fc6d3a Do not expand a token more than once for the same funclike macro 2020-12-07 12:00:06 +09:00
Rui Ueyama c7d7ce0f0c Allow parenthesized expressions as macro arguments 2020-12-07 12:00:06 +09:00
Rui Ueyama b9ad3e43cf Add multi-arity funclike #define 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 1f80f581e5 Add #ifdef and #ifndef 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 2651448084 Expand macros in the #if and #elif argument context 2020-12-07 12:00:06 +09:00
Rui Ueyama 9ad60e41d5 Add #undef 2020-12-07 12:00:06 +09:00
Rui Ueyama 97d33ad3bd Add objlike #define 2020-12-07 12:00:06 +09:00
Rui Ueyama e7a1857a31 Add #elif 2020-12-07 12:00:06 +09:00
Rui Ueyama c6e81d22f8 Add #else 2020-12-07 12:00:06 +09:00
Rui Ueyama aa570f3086 Skip nested #if in a skipped #if-clause 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 d138864a2a Add -E option 2020-12-07 12:00:06 +09:00